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

Fix VertexAI bugs and add function calling #4016

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Lash-L
Copy link
Contributor

@Lash-L Lash-L commented Feb 7, 2025

Description

Opening this in place of #3711 as it fixes all of the relevant problems instead of just one.

Seems like a bug was introduced when the embeddings were merged into the llm.
b14b8c4#diff-f6056e365b00006d0872276e5078b8e10b940dfeca7f0aa106b1c842e5aa5a14

The embedding class's base url didn't have a slash at the end, while the llm one did. Neither one was 'wrong', but they were different, so when it was merged, it ended up having a // in the url.

Removing the / before the embedding url fixes this problem.

As well, a bug was introduced in 3b25f78 that broke sending messages as it took the options out of the needed subsection.

Gemini via AI studio and VertexAI are very very similar. So I extracted out the logic that could be copied from the vertexai send and I now call it in VertexAI. This should help prevent any future issues and allow vertexAI's gemini deployment to piggyback on gemini's.

fixes #4166
fixes #3907
fixes #3595
fixes #3303

Checklist

  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screenshots

[ For visual changes, include screenshots. ]

Testing instructions

[ For new or modified features, provide step-by-step testing instructions to validate the intended behavior of the change, including any relevant tests to run. ]

Copy link

netlify bot commented Feb 7, 2025

Deploy Preview for continuedev ready!

Name Link
🔨 Latest commit 94d2fbf
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/67bdceccdf21f90008376987
😎 Deploy Preview https://deploy-preview-4016--continuedev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sestinj
Copy link
Contributor

sestinj commented Feb 8, 2025

Can you add a test in llm.test.ts for the Vertex class? Shouldn't take much, just about 5 lines of code

@Lash-L Lash-L changed the title Fix two bugs introduced by previous updates Fix two bugs introduced by previous updates for VertexAI Feb 8, 2025
@Lash-L
Copy link
Contributor Author

Lash-L commented Feb 8, 2025

Can you add a test in llm.test.ts for the Vertex class? Shouldn't take much, just about 5 lines of code

Hi are you looking for a TestLLM call? Or something else?

@Lash-L
Copy link
Contributor Author

Lash-L commented Feb 11, 2025

Hey @sestinj - sorry for the ping - just trying to figure out what kind of tests you would like to see.

@Lash-L
Copy link
Contributor Author

Lash-L commented Feb 18, 2025

@sestinj - I am looking at llm.test.ts and to add the LLMTest you need a active gcp account. And then it gets a bit tricky.

The vertex Ai extension auths via gcloud which is a cli object on your machine. You can't just set a API_KEY like you can for all of the other ones, it would be more complicated. You'd likely have to create a service account and store the credentials in a github secret. Is that what you are looking for when you ask for tests?

@Lash-L Lash-L changed the title Fix two bugs introduced by previous updates for VertexAI Fix VertexAI bugs and add function calling Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants