Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] parameter \"tools\" is not supported when in Chat completion #1076

Open
qscez2001 opened this issue Oct 31, 2024 · 0 comments
Open

Comments

@qscez2001
Copy link

Description
When I'm building PoC of Agent, encountered this error.
Model: Mixtral

Reproduction

Load the Agent

agent = AgentWithRetriever()

Example for testing multiple turns of converastion

1st turn of converastion

first_turn_input = {
"messages": [
{"role": "user", "content": f"what is hazard identification?"},
]
}

response = agent.predict(model_input=first_turn_input)

2nd turn of converastion

new_messages = response["messages"]
new_messages.append({"role": "user", "content": f"how do i use it?"})

print(type(new_messages))

second_turn_input = {"messages": new_messages}
response = agent.predict(model_input=second_turn_input)
print(response["content"])

Expected behavior
Expected to use the tool retreived data

Is it a regression?
Don't know

Debug Logs
< for url: https://australiaeast.azuredatabricks.net/serving-endpoints/mixtral/invocations. Response text: {"error_code": null, "message": "unable to parse response. This is likely a bug in the Databricks SDK for Python or the underlying API. Please report this issue with the following debugging information to the SDK issue tracker at https://github.com/databricks/databricks-sdk-go/issues. Request log:POST /serving-endpoints/mixtral/invocations\n> * User-Agent: unknown/0.0.0 databricks-sdk-py/0.36.0 python/3.11.0rc1 os/linux auth/runtime runtime/15.4\n> * Accept-Encoding: gzip, deflate, br\n> * Accept: /\n> * Connection: keep-alive\n> * X-Databricks-Endpoints-API-Client: Databricks Deployment Client\n> * Content-Length: 791\n> * Content-Type: application/json\n> * Authorization: Bearer dkea8390f16f72baf5c7cc01cb1252d64a90\n> {\n> "max_tokens": 1500,\n> "messages": [\n> {\n> "content": "REDACTED",\n> "role": "system"\n> },\n> {\n> "content": "REDACTED",\n> "role": "user"\n> }\n> ],\n> "temperature": 0.01,\n> "tools": [\n> {\n> "function": {\n> "description": "Search for documents that are relevant to a user's query about the [REPLACE WITH DESCRIPTION OF YOUR DOCS].",\n> "name": "retrieve_documents",\n> "parameters": {\n> "properties": {\n> "query": {\n> "description": "The query to find documents about.",\n> "type": "string"\n> }\n> },\n> "required": [\n> "query"\n> ],\n> "type": "object"\n> }\n> },\n> "type": "function"\n> }\n> ]\n> }\n< 400 Bad Request\n< Bad request: parameter "tools" is not supported\n< ```"
Other Information

  • OS: [e.g. macOS]
  • Version: [e.g. 0.1.0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant