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
PSA: Not sure if this is actually a bug, might be a missing feature..
Describe the bug
The command-r model by Cohere is actually working with the CohereChatGenerator, but there seems to be a bug when we provide tools to the generator. It produces an empty response, nothing seems to happen.
On the other hand command returns an error saying tools are not supported.
To Reproduce
Works:
from haystack_integrations.components.generators.cohere import CohereChatGenerator
chat = CohereChatGenerator(model = "command-r")
message = ChatMessage.from_user("What's Natural Language Processing? Be brief.")
print(chat.run([message]))
Does not work (I used the cohere way of function definition here)
tools = [
{
"name": "sql_query_func",
"description": f"This a tool useful to query a SQL table called 'absenteeism' with the following Columns: {', '.join(df.columns)}",
"parameter_definitions": {
"queries": {
"description": "The query to use in the search. Infer this from the user's message. It should be a question or a statement",
"type": "str",
"required": True,
}
}
}
]
messages = [
ChatMessage.from_system(
"You are a helpful and knowledgeable agent who has access to an SQL database which has a table called 'absenteeism'"
),
ChatMessage.from_user("On which days of the week does the average absenteeism time exceed 4 hours?"),
]
chat_generator = CohereChatGenerator(model = "command-r")
response = chat_generator.run(messages=messages, generation_kwargs={"tools": tools})
print(response)
Describe your environment (please complete the following information):
OS: [e.g. iOS] Colab
Haystack version: main branch
Integration version: cohere-haystack-0.6.0
The text was updated successfully, but these errors were encountered:
PSA: Not sure if this is actually a bug, might be a missing feature..
Describe the bug
The
command-r
model by Cohere is actually working with theCohereChatGenerator
, but there seems to be a bug when we provide tools to the generator. It produces an empty response, nothing seems to happen.On the other hand
command
returns an error saying tools are not supported.To Reproduce
Works:
Does not work (I used the cohere way of function definition here)
Describe your environment (please complete the following information):
The text was updated successfully, but these errors were encountered: