google-gemini / generative-ai-swift

The official Swift library for the Google Gemini API
https://ai.google.dev/gemini-api/docs/get-started/tutorial?lang=swift
Apache License 2.0
909 stars 144 forks source link

Remove extraneous `apiVersion: "v1beta"` in function calling sample #139

Closed andrewheard closed 5 months ago

andrewheard commented 5 months ago

Specifying RequestOptions(apiVersion: "v1beta") is no longer necessary in the Function Calling sample since it is the default as of #137.

andrewheard commented 5 months ago

I don't think it's a bad thing to be explicit and remind people they're using a beta.

My preference would be to close. However, if you feel strongly, I'll approve.

@paulb777 I don't feel super strongly either way. My main argument in favour of removing it is to avoid overriding the defaults if not necessary since we may migrate back to v1 in the future. Could also simplify migration to Vertex AI SDKs since we don't support overriding the apiVersion there.

paulb777 commented 5 months ago

What are the other platforms doing?

andrewheard commented 5 months ago

What are the other platforms doing?

@paulb777 Currently Dart is the only client-side SDK that offers a function calling sample. They do specify v1beta but it only became the default today -- will ask opinions.

andrewheard commented 5 months ago

Dart is planning to remove the v1beta argument in https://github.com/google-gemini/generative-ai-dart/pull/127/files#diff-84d1116bc601acf95035dd6857c2f31fa41e2b7bf3a0e8a1860b313938ab0630L42.

paulb777 commented 5 months ago

OK, I'm fine to merge. Thanks for checking.