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
867 stars 131 forks source link

Embedding model support? #105

Open thrashr888 opened 5 months ago

thrashr888 commented 5 months ago

Description of the feature request:

Support for models/embedding-001 from https://ai.google.dev/models/gemini and https://ai.google.dev/examples/doc_search_emb

What problem are you trying to solve with this feature?

I'd like to support document Q&A using this package because I'm already using it for Gemini text generation.

Any other information you'd like to share?

Thank you!

paulb777 commented 4 months ago

This is not a currently prioritized feature request, but will continue to evaluate.

Please indicate interest with a thumbs-up vote on the issue.

thrashr888 commented 4 months ago

It's surprising that this API client didn't intend to support the full completion and embedding API, similar to the other client libraries and other AI models' API clients. But I fully understand priorities must be had. I hope others find this useful enough to upvote! Without it, I can't fully support generation with RAG applications with just the Gemini service and API keys though I'd really love to. Thank you for your consideration.