-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Which connector is affected?
All sources that support filtering.
What would you like to see improved?
How possible is to send additional parameters for metadata filtering?
response = co.chat(
message="What is the chemical formula for glucose?",
connectors=[{"id": "my-connector", "params": {"some_field": "some_value"} }]
)
The only way I can think of now is passing parameters on creation time:
created_connector = co.create_connector(
name="Example connector",
url="https://connector-example.com/search?some_field=some_value",
)
But that's not very flexible.
Do you think calling the connector API directly with the filters, and then sending the results to the Cohere documents endpoint would do the trick?
curl --request POST
--url 'https://connector-example.com/search'
--header 'Content-Type: application/json'
--data '{
"query": "How do I expense a meal?" ,
"some_field": "some_value"
}'
And then
response = co.chat(
message=message,
documents=documents,
conversation_id=self.conversation_id,
stream=True,
)
Is there a simpler way to achieve this filtering?
Thanks!
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels