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/
|
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/
|
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 |
|