TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
9.42k stars 742 forks source link

Is it possible to support gemini api #514

Closed 4t8dd closed 6 months ago

4t8dd commented 6 months ago

I am not sure how big the difference between gpt and gemini. I assume it is small based on some open report. I wonder if it is possible to support gemini api? It is free anyway.

CheerfulPianissimo commented 6 months ago

https://github.com/zhu327/gemini-openai-proxy seems like it could be used for this.

CheerfulPianissimo commented 6 months ago

Ok, can confirm that works. Just set API_BASE_URL to http://localhost:8080/v1 and the openai key to your gemini api key with the proxy running.

4t8dd commented 6 months ago

@CheerfulPianissimo Thanks for your trying. It works for too. And there is another repo with which you can deploy this proxy to some saas and it works perfectly for me .

nullnuller commented 6 months ago

Is anyone else having this issue?

"model": "gpt-4",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"temperature": 0.7
}'
curl: (52) Empty reply from server

Here's the docker:
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9a49c5c0b3e4 zhu327/gemini-openai-proxy:latest "/app/gemini" 3 minutes ago Up 3 minutes 0.0.0.0:8081->8081/tcp gemini