datastax / astra-assistants-api

Drop in replacement for the OpenAI Assistants API
Apache License 2.0
154 stars 18 forks source link

Multiple tool calls not working #71

Open hemantvsn opened 2 months ago

hemantvsn commented 2 months ago

In my application, which was working on OPEN AI ASSISTANT, for a given user question, it makes multiple function/tool calls Eg - get_databases -> get_tables_for_database -> execute_query

But when I replaced with ASTRA ASSISTANT API, its unable to make more than 1 tool call. After response from first tool call, the run status is completed and it returns the answer

phact commented 2 months ago

Hi @hemantvsn, welcome and thanks for filing this issue!

Are you referring to parallel tool calls like here? https://platform.openai.com/docs/guides/function-calling/configuring-parallel-function-calling

hemantvsn commented 2 months ago

NO

In my case, to get to answer 1 tool call is made after another. (based on response of first) Eg - first - get_tables then it identifies which table is more suited to answer a question.

Then in next tool call - get_table_structure(table_id)

Then once it identifies the table structure, it makes next tool call - execute_query(query)

phact commented 2 months ago

Interesting, I'm having trouble finding information about multiple sequential tool calls in the same run in the official assistants API documentation so we may have to try things empirically.

Do you happen to have an example you can share that reproduces this behavior?