You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"code": "resp = client.inference.text_embedding(\n inference_id=\"my-cohere-endpoint\",\n input=\"The sky above the port was the color of television tuned to a dead channel.\",\n input_type=\"ingest\",\n)"
11555
+
"code": "resp = client.inference.text_embedding(\n inference_id=\"my-cohere-endpoint\",\n input=\"The sky above the port was the color of television tuned to a dead channel.\",\n task_settings={\n \"input_type\": \"ingest\"\n },\n)"
11556
11556
},
11557
11557
{
11558
11558
"language": "JavaScript",
11559
-
"code": "const response = await client.inference.textEmbedding({\n inference_id: \"my-cohere-endpoint\",\n input:\n \"The sky above the port was the color of television tuned to a dead channel.\",\n input_type: \"ingest\",\n});"
11559
+
"code": "const response = await client.inference.textEmbedding({\n inference_id: \"my-cohere-endpoint\",\n input:\n \"The sky above the port was the color of television tuned to a dead channel.\",\n task_settings: {\n input_type: \"ingest\",\n },\n});"
11560
11560
},
11561
11561
{
11562
11562
"language": "Ruby",
11563
-
"code": "response = client.inference.text_embedding(\n inference_id: \"my-cohere-endpoint\",\n body: {\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\": \"ingest\"\n }\n)"
11563
+
"code": "response = client.inference.text_embedding(\n inference_id: \"my-cohere-endpoint\",\n body: {\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"task_settings\": {\n \"input_type\": \"ingest\"\n }\n }\n)"
11564
11564
},
11565
11565
{
11566
11566
"language": "PHP",
11567
-
"code": "$resp = $client->inference()->textEmbedding([\n \"inference_id\" => \"my-cohere-endpoint\",\n \"body\" => [\n \"input\" => \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\" => \"ingest\",\n ],\n]);"
11567
+
"code": "$resp = $client->inference()->textEmbedding([\n \"inference_id\" => \"my-cohere-endpoint\",\n \"body\" => [\n \"input\" => \"The sky above the port was the color of television tuned to a dead channel.\",\n \"task_settings\" => [\n \"input_type\" => \"ingest\",\n ],\n ],\n]);"
11568
11568
},
11569
11569
{
11570
11570
"language": "curl",
11571
-
"code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"The sky above the port was the color of television tuned to a dead channel.\",\"input_type\":\"ingest\"}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-cohere-endpoint\""
11571
+
"code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"The sky above the port was the color of television tuned to a dead channel.\",\"task_settings\":{\"input_type\":\"ingest\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-cohere-endpoint\""
"code": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"contextualai-rerank\",\n inference_config={\n \"service\": \"contextualai\",\n \"service_settings\": {\n \"api_key\": \"ContextualAI-Api-key\",\n \"model_id\": \"ctxl-rerank-v2-instruct-multilingual-mini\"\n },\n \"task_settings\": {\n \"instruction\": \"Rerank the following documents based on their relevance to the query.\",\n \"top_k\": 3\n }\n },\n)"
14988
-
},
14989
-
{
14990
-
"language": "JavaScript",
14991
-
"code": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"contextualai-rerank\",\n inference_config: {\n service: \"contextualai\",\n service_settings: {\n api_key: \"ContextualAI-Api-key\",\n model_id: \"ctxl-rerank-v2-instruct-multilingual-mini\",\n },\n task_settings: {\n instruction:\n \"Rerank the following documents based on their relevance to the query.\",\n top_k: 3,\n },\n },\n});"
14992
-
},
14993
-
{
14994
-
"language": "Ruby",
14995
-
"code": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"contextualai-rerank\",\n body: {\n \"service\": \"contextualai\",\n \"service_settings\": {\n \"api_key\": \"ContextualAI-Api-key\",\n \"model_id\": \"ctxl-rerank-v2-instruct-multilingual-mini\"\n },\n \"task_settings\": {\n \"instruction\": \"Rerank the following documents based on their relevance to the query.\",\n \"top_k\": 3\n }\n }\n)"
14996
-
},
14997
-
{
14998
-
"language": "PHP",
14999
-
"code": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"contextualai-rerank\",\n \"body\" => [\n \"service\" => \"contextualai\",\n \"service_settings\" => [\n \"api_key\" => \"ContextualAI-Api-key\",\n \"model_id\" => \"ctxl-rerank-v2-instruct-multilingual-mini\",\n ],\n \"task_settings\" => [\n \"instruction\" => \"Rerank the following documents based on their relevance to the query.\",\n \"top_k\" => 3,\n ],\n ],\n]);"
15000
-
},
15001
-
{
15002
-
"language": "curl",
15003
-
"code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"contextualai\",\"service_settings\":{\"api_key\":\"ContextualAI-Api-key\",\"model_id\":\"ctxl-rerank-v2-instruct-multilingual-mini\"},\"task_settings\":{\"instruction\":\"Rerank the following documents based on their relevance to the query.\",\"top_k\":3}}' \"$ELASTICSEARCH_URL/_inference/rerank/contextualai-rerank\""
0 commit comments