Skip to content

Access gemini-1.5-pro-latest #128

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

Closed
mobilinked opened this issue Apr 10, 2024 · 2 comments
Closed

Access gemini-1.5-pro-latest #128

mobilinked opened this issue Apr 10, 2024 · 2 comments
Labels
component:swift sdk Issue/PR related to Swift SDK status:awaiting user response Awaiting a response from the author type:feature request New feature/request/enhancement

Comments

@mobilinked
Copy link

Description of the feature request:

As the title, to access the gemini-1.5-pro-latest model

What problem are you trying to solve with this feature?

Get fatal error when using model of gemini-1.5-pro-latest


Error raised at top level: GoogleGenerativeAI.GenerateContentError.internalError(underlying: GoogleGenerativeAI.RPCError(httpResponseCode: 404, message: "models/gemini-1.5-pro-latest is not found for API version v1, or is not supported for GenerateContent. Call ListModels to see the list of available models and their supported methods.", status: GoogleGenerativeAI.RPCStatus.notFound, details: []))

Any other information you'd like to share?

No response

@mobilinked mobilinked added component:swift sdk Issue/PR related to Swift SDK type:feature request New feature/request/enhancement labels Apr 10, 2024
@andrewheard
Copy link
Collaborator

Hi @mobilinked, at the moment I'm only seeing gemini-1.5-pro-latest on the v1beta version of the API. Would you mind trying that version instead (see RequestOptions in the snippet below to switch from the default v1)?

let model = GenerativeModel(
  name: "gemini-1.5-pro-latest",
  apiKey: APIKey.default,
  requestOptions: RequestOptions(apiVersion: "v1beta")
)

@andrewheard andrewheard added the status:awaiting user response Awaiting a response from the author label Apr 10, 2024
@mobilinked
Copy link
Author

It works. Thanks much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:swift sdk Issue/PR related to Swift SDK status:awaiting user response Awaiting a response from the author type:feature request New feature/request/enhancement
Projects
None yet
Development

No branches or pull requests

2 participants