datastax / astra-assistants-api

Drop in replacement for the OpenAI Assistants API
Apache License 2.0
142 stars 17 forks source link

[Question] Functions with other models, setting the model in run.create, more #2

Closed h14turkiye closed 7 months ago

h14turkiye commented 7 months ago

Does function calling work with other models such as gemini?

Is it possible to change the model of the assistant at the run?

run = await self.beta.threads.runs.create(
            thread_id=thread.id,
            assistant_id=assistant_id
            model="gemini/gemini-pro"
        )

I already have assistants in the playground, do I need to create them since you are possibly storing it in your database?

Do you use my data?

What is stored on AstraDB? (edited)

phact commented 7 months ago

Hi, thanks for asking:

Does function calling work with other models such as gemini?

Yes, here's the example https://github.com/datastax/astra-assistants-api/blob/main/examples/python/function_calling/basic.py#L11-L18. You can uncomment the model you want to test with. Just make sure you have the right env var for the model you're trying to run.

Is it possible to change the model of the assistant at the run?

Since model is a property of the assistant, you have to either modify the assistant itself and change the model, or run a different assistant against your thread. You can run different assistants against the same thread.

run = await self.beta.threads.runs.create( thread_id=thread.id, assistant_id=assistant_id model="gemini/gemini-pro" ) I already have assistants in the playground, do I need to create them since you are possibly storing it in your database?

Yes, you need to re-create any assistants you may have created using OpenAI in Astra Assistants.

Do you use my data?

No, we will never use or train on your data. It is stored in your private database and is treated like any other AstraDB database. We take security very seriously, see our compliance documentation at https://trust.datastax.com/

What is stored on AstraDB?

The Astra Assistant API stores all the durable objects in the API including files, threads, messages, assistants, etc. in AstraDB. You can see this data by logging into astra.datastax.com and you can interact with it like any other AstraDB data.