SilasMarvin / lsp-ai

LSP-AI is an open-source language server that serves as a backend for AI-powered functionality, designed to assist and empower software engineers, not replace them.
MIT License
1.8k stars 54 forks source link

Add google generative language api support #28

Closed asukaminato0721 closed 5 days ago

asukaminato0721 commented 1 week ago

https://aistudio.google.com/app/prompts/new_chat

currently it's free.

usage

curl \
  -H 'Content-Type: application/json' \
  -d '{"contents":[{"parts":[{"text":"Explain how AI works"}]}]}' \
  -X POST 'https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent?key=YOUR_API_KEY'
SilasMarvin commented 1 week ago

We do not currently but this sounds like a great option to support! Adding this into the roadmap. I will post some updates here. You are also welcome to add it if you want, it's not too difficult to add a backend if you have some experience with Rust. I'm happy to point you in the right direction.