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

Update ai ext #7963

Merged
merged 14 commits into from
Nov 22, 2024
Merged

Update ai ext #7963

merged 14 commits into from
Nov 22, 2024

Conversation

diksipav
Copy link
Contributor

@diksipav diksipav commented Nov 4, 2024

Add up to date models to the ai.edgeql.

Update ai ext:

  • support diff model properties (like temperature, max_tokens etc), I didn't test if all of these props work properly, mostly because I still lack understanding when should I use some of them.
  • support tool calling.

Tested basic rag queries and queries that involve function calling with OpenAI, Mistral and Anthropic.

Questions about the country are using function calling.
https://github.com/user-attachments/assets/68d89295-1082-4573-a194-f218e709a154

@diksipav diksipav requested a review from elprans November 6, 2024 12:15
@diksipav diksipav marked this pull request as ready for review November 6, 2024 12:15
@diksipav diksipav requested a review from dnwpark November 6, 2024 12:15
"objects"
"prompt.custom must be a list, where each element is \
one of the following types: \
- EdgeDBSystemMessage: { role, content } \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does EdgeDBSystemMessage and others come from? Seems a bit confusing since those aren't actual keys in input?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the type EdgeDBSystemMessage etc are defined in the js vercel provider and js ai binding,
they represent the messages user provides, like the chat history

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but this is server-side. If one interacts with the API via another SDK the errors would not make sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get it, I believe the error is better now. It should be understandable enough for everyone.

Copy link
Contributor

@dnwpark dnwpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I've mostly commented on some style things.

mmastrac added a commit to mmastrac/edgedb that referenced this pull request Nov 19, 2024
Copy link
Contributor

@dnwpark dnwpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments all resolved, looks good!

@diksipav diksipav merged commit 40c06b9 into master Nov 22, 2024
24 checks passed
@diksipav diksipav deleted the update-ai-ext branch November 22, 2024 10:46
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

Successfully merging this pull request may close these issues.

5 participants