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

feat (ai/provider): add Google Vertex provider #1592

Merged
merged 30 commits into from
May 23, 2024
Merged

feat (ai/provider): add Google Vertex provider #1592

merged 30 commits into from
May 23, 2024

Conversation

lgrammel
Copy link
Collaborator

@lgrammel lgrammel commented May 15, 2024

Summary

Adds an AI SDK provider for Google Vertex. It supports text generation and streaming for text and image inputs.

Tasks

  • implement provider
    • better env param errors
    • support streaming
    • support image inputs
    • map finish reason
    • support settings
  • test
  • examples
  • docs
    • provider page
    • add to overview pages
  • changesets

Future Work

  • support tool calling

@lgrammel lgrammel self-assigned this May 15, 2024
@lgrammel lgrammel changed the title [WIP] feat (ai/provider): add Google Vertex provider feat (ai/provider): add Google Vertex provider May 17, 2024
@lgrammel lgrammel marked this pull request as ready for review May 23, 2024 12:10
@lgrammel lgrammel requested review from jeremyphilemon, shuding and MaxLeiter and removed request for shuding, MaxLeiter and jeremyphilemon May 23, 2024 13:59
@lgrammel lgrammel merged commit 6a50ac4 into main May 23, 2024
6 checks passed
@lgrammel lgrammel deleted the lg/vertex branch May 23, 2024 14:07
@li2109
Copy link

li2109 commented May 30, 2024

Can you also add googleAuthOptions to GoogleVertexProviderSettings?
context: https://stackoverflow.com/questions/77944196/vertex-ai-googleautherror-in-nodejs

BTW, it would be great if preview models could be supported like gemini-1.5-pro and flash.

const authOptions = {
        credentials: {
            client_email: process.env.GOOGLE_VERTEX_CLIENT_EMAIL,
            private_key: process.env.GOOGLE_VERTEX_PRIVATE_KEY!.replace(/\\n/g, "\n"),
        }
    }

    const vertex_ai = new VertexAI({
        project: process.env.GOOGLE_VERTEX_PROJECT!,
        location: process.env.GOOGLE_VERTEX_LOCATION,
        googleAuthOptions: authOptions,
    });
const model = vertex_ai.preview.getGenerativeModel({ model: 'gemini-1.5-flash-001' })

Thank you!

@lgrammel
Copy link
Collaborator Author

@li2109 flash etc should be supported (strings can be entered as model). can you file an issue for the googleAuthOptions so it does not get lost?

@li2109
Copy link

li2109 commented May 31, 2024

Can you also add googleAuthOptions to GoogleVertexProviderSettings? context: https://stackoverflow.com/questions/77944196/vertex-ai-googleautherror-in-nodejs

Thank you!
#1773

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.

None yet

2 participants