From 1cb395419cdbe24912f7ed12f9db0345df93ec50 Mon Sep 17 00:00:00 2001 From: Justin Date: Sun, 5 Jan 2025 12:50:01 -0800 Subject: [PATCH] fix manual docs --- .env.example | 3 ++- docs/getting-started/self-host/manual.mdx | 18 +++++++++++------- valhalla/jawn/.env.example | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index ba3e9cc47d..6abd19bed0 100644 --- a/.env.example +++ b/.env.example @@ -8,4 +8,5 @@ SUPABASE_URL="http://localhost:54321" NEXT_PUBLIC_HELICONE_RESTRICT_PRO="true" NEXT_PUBLIC_BASE_PATH="https://oai.helicone.ai/v1" NEXT_PUBLIC_SLACK_CLIENT_ID="1234567890" -SLACK_CLIENT_SECRET="1234567890" \ No newline at end of file +SLACK_CLIENT_SECRET="1234567890" +NEXT_PUBLIC_HELICONE_JAWN_SERVICE="http://localhost:8585" \ No newline at end of file diff --git a/docs/getting-started/self-host/manual.mdx b/docs/getting-started/self-host/manual.mdx index 35736799e5..42373b0f8e 100644 --- a/docs/getting-started/self-host/manual.mdx +++ b/docs/getting-started/self-host/manual.mdx @@ -73,8 +73,8 @@ yarn ``` ```bash -# Start All Workers -bash run_all_workers.sh +# Start OpenAI Proxy Worker +npx wrangler dev --local --var WORKER_TYPE:OPENAI_PROXY --port 8787 --test-scheduled ``` ### Start Jawn (Serves Web) @@ -83,6 +83,7 @@ I a new terminal tab, run the following: ```bash cd valhalla/jawn +cp .env.example .env yarn && yarn dev ``` @@ -91,9 +92,10 @@ yarn && yarn dev I a new terminal tab, run the following: ```bash +cp .env.example web/.env cd web yarn -yarn dev +yarn dev:local -p 3000 ``` ## Step 3 - Setup your instance @@ -101,15 +103,17 @@ yarn dev You are done! ```bash +export OPENAI_API_KEY="sk-" +export HELICONE_API_KEY="sk-helicone-aizk36y-5yue2my-qmy5tza-n7x3aqa" curl --request POST \ --url http://127.0.0.1:8787/v1/chat/completions \ - --header 'Authorization: Bearer ' \ - --header 'Helicone-Auth: Bearer sk-helicone-aizk36y-5yue2my-qmy5tza-n7x3aqa' \ + --header "Authorization: Bearer $OPENAI_API_KEY" \ + --header "Helicone-Auth: Bearer $HELICONE_API_KEY" \ --header 'Content-Type: application/json' \ - --header 'OpenAI-Organization: ' \ + --header 'Accept-Encoding: identity' \ --header 'helicone-property-hello: world' \ --data '{ - "model": "gpt-3.5-turbo-0613", + "model": "gpt-4o-mini", "messages": [ { "role": "system", diff --git a/valhalla/jawn/.env.example b/valhalla/jawn/.env.example index f838b1e794..fba71ef73b 100644 --- a/valhalla/jawn/.env.example +++ b/valhalla/jawn/.env.example @@ -5,3 +5,4 @@ S3_SECRET_KEY="minioadmin" S3_ENDPOINT="http://localhost:9000" S3_BUCKET_NAME="request-response-storage" HELICONE_WORKER_URL="http://localhost:8787" +CSB_API_KEY="unknown" \ No newline at end of file