Closed danielraffel closed 5 months ago
Actually it is indeed intended behavior, as root of deployed server is not API endpoint. And there is no place to enter your API key because it should be passed as a part of request to endpoint. So you need to enter it somewhere in your client app.
For example, when using with curl:
curl https://my-openai-gemini-demo.vercel.app/v1/chat/completions \
-H "Authorization: Bearer $YOUR_GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello"}],
"temperature": 0.7
}'
Right on, these might be good notes to add on the sites read me.
Actually this info is exactly on my demo site, perhaps you have missed the link. It is easy to put same info on each deployed site. While that is a tempting idea, that may lead to undesired consequences - the endpoint is meant for your personal use, so there is no reason to tell everyone in internet how to utilize it.
E.g. see yourself, my endpoint is already in Google: https://google.com/search?q=%22This+is+demo+instance+of+Gemini+%E2%9E%9C+OpenAI+API+transforming+proxy%21%22 Perhaps it is not that you'd want for your private one.
Yeah, I didn't visit your demo site. I'm not sure it's a safe bet to assume others will. It seems handy to provide useful info in the GitHub read me but this is your project and your call. Just offering a suggestion for you to consider since folks might deploy and be confused by the 404 error and lack of where to enter the API key. I suspect it would help others if you considered adding this info to your repo.
Tried the 1-click Vercel installer and got a 404 Not Found after it deployed successfully. Unclear if that is intentional but presume not as I also can't find where to add my Google API key.