Spaces:
Running
on
T4
Running
on
T4
gabriel chua
commited on
Commit
•
d336953
1
Parent(s):
156dea7
refactor model_id as constant
Browse files
utils.py
CHANGED
@@ -13,6 +13,8 @@ from gradio_client import Client
|
|
13 |
from openai import OpenAI
|
14 |
from pydantic import ValidationError
|
15 |
|
|
|
|
|
16 |
client = OpenAI(
|
17 |
base_url="https://api.fireworks.ai/inference/v1",
|
18 |
api_key=os.getenv("FIREWORKS_API_KEY"),
|
@@ -46,7 +48,7 @@ def call_llm(system_prompt: str, text: str, dialogue_format):
|
|
46 |
{"role": "system", "content": system_prompt},
|
47 |
{"role": "user", "content": text},
|
48 |
],
|
49 |
-
model=
|
50 |
max_tokens=16_384,
|
51 |
temperature=0.1,
|
52 |
response_format={
|
|
|
13 |
from openai import OpenAI
|
14 |
from pydantic import ValidationError
|
15 |
|
16 |
+
MODEL_ID = "accounts/fireworks/models/llama-v3p1-405b-instruct"
|
17 |
+
|
18 |
client = OpenAI(
|
19 |
base_url="https://api.fireworks.ai/inference/v1",
|
20 |
api_key=os.getenv("FIREWORKS_API_KEY"),
|
|
|
48 |
{"role": "system", "content": system_prompt},
|
49 |
{"role": "user", "content": text},
|
50 |
],
|
51 |
+
model=MODEL_ID,
|
52 |
max_tokens=16_384,
|
53 |
temperature=0.1,
|
54 |
response_format={
|