mishig HF staff commited on
Commit
94003fb
1 Parent(s): 2271079

shorter base url for OAI client

Browse files
src/lib/components/InferencePlayground/InferencePlaygroundCodeSnippets.svelte CHANGED
@@ -329,7 +329,7 @@ print(completion.choices[0].message)`,
329
  code: `from openai import OpenAI
330
 
331
  client = OpenAI(
332
- base_url="https://api-inference.huggingface.co/models/${conversation.model.id}/v1/",
333
  api_key="${tokenStr}"
334
  )
335
 
@@ -353,7 +353,7 @@ for chunk in stream:
353
  code: `from openai import OpenAI
354
 
355
  client = OpenAI(
356
- base_url="https://api-inference.huggingface.co/models/${conversation.model.id}/v1/",
357
  api_key="${tokenStr}"
358
  )
359
 
 
329
  code: `from openai import OpenAI
330
 
331
  client = OpenAI(
332
+ base_url="https://api-inference.huggingface.co/v1/",
333
  api_key="${tokenStr}"
334
  )
335
 
 
353
  code: `from openai import OpenAI
354
 
355
  client = OpenAI(
356
+ base_url="https://api-inference.huggingface.co/v1/",
357
  api_key="${tokenStr}"
358
  )
359