portkey server is not working locally #458
Replies: 6 comments 6 replies
-
There is no UI bundled with the gateway @jankigabani |
Beta Was this translation helpful? Give feedback.
-
but wha about i'll go on this server : http://localhost:8787/v1 still i'm not able to see the anything i'm getting error : |
Beta Was this translation helpful? Give feedback.
-
yes, all i'm saying is that if i remove /v1 then and i followed this file : https://github.com/Portkey-AI/gateway is it possible to see the dashboard while running locally ? --> like this -> https://portkey.ai/docs/welcome/make-your-first-request i didn't entered the portkey api key because here in above readme file it is written that : not needed when running locally `from openai import OpenAI gateway = OpenAI( chat_complete = gateway.chat.completions.create( |
Beta Was this translation helpful? Give feedback.
-
okay, let me ask one question how can i see/get the porkey dashboard on localhost? do you have any resources? @narengogi |
Beta Was this translation helpful? Give feedback.
-
Hi @jankigabani - there is currently a difference in the open source v/s hosted version of Portkey. The hosted version is available on The open source version is completely headless - it does not come with any sort of UI. It only spins up a Portkey Gateway server on your local system with which you can route your requests and apply fallback, loadbalancing and other mechanisms using the Configs. Whereas the hosted version comes in built with observability, and the full dashboard where you can see each request, it's cost/token details, and more. Please let me know if this clears it up! Happy to help you setup the hosted version if you'd like as well! |
Beta Was this translation helpful? Give feedback.
-
okay. thank you (understood) |
Beta Was this translation helpful? Give feedback.
-
I'm trying to use portkey gateway completely locally. i have passed this cmd and got below
npx @portkey-ai/gateway Your AI Gateway is now running on http://localhost:8787 🚀 Returned in Retry Attempt 1. Status: true 200 Returned in Retry Attempt 1. Status: true 200
in short i'm not getting ui on server : http://localhost:8787/v1
i'm getting this
{"status":"failure","message":"Either x-portkey-config or x-portkey-provider header is required"}
and i have just tried your code present on colab
`client = OpenAI(
api_key=OPENAI_API_KEY,
base_url=PORTKEY_GATEWAY_URL,
default_headers=createHeaders(
provider="openai",
api_key=PORTKEY_API_KEY
)
)
chat_complete = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user",
"content": "What's a fractal?"}],
)
print(chat_complete.choices[0].message.content)`
help me to fix this
Beta Was this translation helpful? Give feedback.
All reactions