Abraxas-365 / langchain-rust

🦜️🔗LangChain for Rust, the easiest way to write LLM-based programs in Rust
MIT License
625 stars 83 forks source link

Add Gemini API Support #230

Open evgenyigumnov opened 1 month ago

evgenyigumnov commented 1 month ago

Description:

We need to integrate the Gemini API into our application. Google Gemini API offers free usage with rate limits, making it an attractive option for enhancing our service's capabilities. The API should be used to expand our existing functionality, while ensuring that we respect the rate limits imposed by the API to avoid any disruptions or excessive throttling.

Additional Info:

prabirshrestha commented 1 month ago

Would you be interested in contribution?

evgenyigumnov commented 1 month ago
  1. We plan to add langchain-rust to https://github.com/evgenyigumnov/rustsn
  2. I do not know langchain-rust code base and for me more easely add Gemini API directly to Rustsn without langchain-rust

Conclusion: Could any body other implement Gemeini API in langchain project?

mdabir1203 commented 1 month ago

I would like to take this issue and contribute to it. May I know in which part of the codebase have you implemented the api connection ?

prabirshrestha commented 1 month ago

Suggest looking in this folder. https://github.com/Abraxas-365/langchain-rust/tree/main/src/llm

prabirshrestha commented 6 days ago

Gemini is now OpenAI compatible which means you can use existing OpenAI libraries including langchain-rust.

https://developers.googleblog.com/en/gemini-is-now-accessible-from-the-openai-library/