Spaces:
Runtime error
Runtime error
leandrocarneiro
commited on
Upload llm.py
Browse files
llm.py
CHANGED
@@ -22,14 +22,15 @@ def invoke_llm(context, task, model):
|
|
22 |
temperature=0.3,
|
23 |
openai_api_key=os.environ['OPENAI_KEY'],
|
24 |
max_tokens=1000)
|
|
|
|
|
25 |
else:
|
26 |
-
llm=
|
27 |
temperature=0.3,
|
28 |
together_api_key=os.environ['TOGETHER_KEY'],
|
29 |
max_tokens=1000)
|
30 |
-
|
31 |
-
|
32 |
-
return result.content
|
33 |
|
34 |
|
35 |
|
|
|
22 |
temperature=0.3,
|
23 |
openai_api_key=os.environ['OPENAI_KEY'],
|
24 |
max_tokens=1000)
|
25 |
+
result = llm.invoke(prompt)
|
26 |
+
return result.content
|
27 |
else:
|
28 |
+
llm=Together(model="mistralai/Mixtral-8x7B-Instruct-v0.1",
|
29 |
temperature=0.3,
|
30 |
together_api_key=os.environ['TOGETHER_KEY'],
|
31 |
max_tokens=1000)
|
32 |
+
result = llm.invoke(prompt)
|
33 |
+
return result
|
|
|
34 |
|
35 |
|
36 |
|