We've started up a webserver that provides a simple HTTP API (with only one method) that enables you to generate concatenated p-mean sentence embeddings.
The current loaded model is "{{ model_name }}".
## Sub-Projects
This repository contains different sub-projects:
```
We've started up a webserver that provides a simple HTTP API (with only one method) that enables you to generate concatenated p-mean sentence embeddings.
The current loaded model is "{{ model_name }}".
This is the only endpoint of our API. You can pass a list of sentences for which concatenated p-mean sentence embeddings will be generated. We recommend a maximum number of 500 sentences per request. Sentences should be already tokenized (tokens separated by spaces).
POST /embed
| Parameter | Description |
|---|---|
| conversion |
A JSON string that contains input sentences and a list of embedding types and p-means that should be concatenated: {
{%- if model_name.startswith('en') %}
'sentences': ['first_en sentence_en', 'second_en sentence_en'],
{%- else %}
'sentences': ['first sentence', 'second sentence'],
{%- endif %}
'embedding_types': [
{%- for e in embeddings %}
('{{ e.alias }}', ['mean', 'min', 'max', 'p_mean_3']),
{%- endfor %}
]
}
Available embeddings:
{% for e in embeddings %} {{ e.alias }} {% endfor %}
|
Response
One sentence embedding per line that corresponds to the ith input sentence.
Here you can generate python code to query the API with the chosen embeddings and p-means!
| Generated Code |
|---|