Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,17 +15,8 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 15 |
|
| 16 |
# --- Basic Agent Definition ---
|
| 17 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 18 |
-
from
|
| 19 |
-
|
| 20 |
-
class TogetherWrapper:
|
| 21 |
-
def __call__(self, prompt):
|
| 22 |
-
response = completion(
|
| 23 |
-
model="togethercomputer/llama-2-70b-chat",
|
| 24 |
-
messages=[{"role": "user", "content": prompt}],
|
| 25 |
-
api_key=os.getenv("TOGETHER_API_KEY"),
|
| 26 |
-
provider="together"
|
| 27 |
-
)
|
| 28 |
-
return response["choices"][0]["message"]["content"]
|
| 29 |
|
| 30 |
|
| 31 |
|
|
@@ -35,6 +26,11 @@ class BasicAgent:
|
|
| 35 |
|
| 36 |
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
self.agent = Agent(
|
| 39 |
role="QA Specialist",
|
| 40 |
goal="Answer benchmark questions accurately with deep reasoning and knowledge",
|
|
|
|
| 15 |
|
| 16 |
# --- Basic Agent Definition ---
|
| 17 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 18 |
+
from langchain.llms import Together
|
| 19 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
+
self.llm = Together(
|
| 30 |
+
model="deepseek-ai/DeepSeek-V3", # or any supported model
|
| 31 |
+
temperature=0.3,
|
| 32 |
+
together_api_key=os.getenv("TOGETHER_API_KEY")
|
| 33 |
+
)
|
| 34 |
self.agent = Agent(
|
| 35 |
role="QA Specialist",
|
| 36 |
goal="Answer benchmark questions accurately with deep reasoning and knowledge",
|