Skip to content

Commit

Permalink
[fix] temporary disable cohere for chat tools
Browse files Browse the repository at this point in the history
  • Loading branch information
KyrianC committed May 16, 2024
1 parent 82f2db5 commit e7182e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion edenai_apis/apis/cohere/cohere_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,10 @@ def text__chat(
tool_choice: Literal["auto", "required", "none"] = "auto",
tool_results: Optional[List[dict]] = None,
) -> ResponseType[Union[ChatDataClass, StreamChat]]:
messages = [{"role": "USER", "message": text}]

if any([available_tools, tool_results]):
raise ProviderException("This provider does not support the use of tools")

previous_history = previous_history or []
messages = [
{"role": msg.get("role"), "message": msg.get("message") or None}
Expand Down

0 comments on commit e7182e9

Please sign in to comment.