Update app.py
Browse files
app.py
CHANGED
|
@@ -22,18 +22,21 @@ def gpu_check():
|
|
| 22 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 23 |
|
| 24 |
|
|
|
|
| 25 |
class BasicAgent:
|
| 26 |
def __init__(self):
|
| 27 |
print("BasicAgent initialized.")
|
| 28 |
def __call__(self, question: str) -> str:
|
| 29 |
response = graph.invoke({
|
| 30 |
"messages": [SystemMessage(content = """
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
| 37 |
"""), HumanMessage(content=question)],
|
| 38 |
"file_path": None,
|
| 39 |
"url": None,
|
|
@@ -216,4 +219,4 @@ if __name__ == "__main__":
|
|
| 216 |
print("-"*(60 + len(" App Starting ")) + "\n")
|
| 217 |
|
| 218 |
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
| 219 |
-
demo.launch(debug=True, share=False)
|
|
|
|
| 22 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 23 |
|
| 24 |
|
| 25 |
+
|
| 26 |
class BasicAgent:
|
| 27 |
def __init__(self):
|
| 28 |
print("BasicAgent initialized.")
|
| 29 |
def __call__(self, question: str) -> str:
|
| 30 |
response = graph.invoke({
|
| 31 |
"messages": [SystemMessage(content = """
|
| 32 |
+
You are a helpful assistant tasked with answering questions using a set of tools.
|
| 33 |
+
Now, I will ask you a question. Report your thoughts, and answer in the fewest words possible.
|
| 34 |
+
If the answer is only one word, format it as such, no extra punctuation.
|
| 35 |
+
If your answer is a list, use a comma delimited list. Ex "cornstarch, freshly squeezed lemon juice, granulated sugar" or "Myanmar, Indonesia"
|
| 36 |
+
If your answer is a number, only respond with the number, nothing else.
|
| 37 |
+
DO NOT USE SQUARE BRACKETS IN YOUR ANSWERS UNLESS DIRECTLY STATED.
|
| 38 |
+
DO NOT START YOUR ANSWER WITH "YOUR FINAL ANSWER".
|
| 39 |
+
YOUR ANSWER SHOULD ONLY BE THE ANSWER AND NOTHING ELSE.
|
| 40 |
"""), HumanMessage(content=question)],
|
| 41 |
"file_path": None,
|
| 42 |
"url": None,
|
|
|
|
| 219 |
print("-"*(60 + len(" App Starting ")) + "\n")
|
| 220 |
|
| 221 |
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
| 222 |
+
demo.launch(debug=True, share=False)
|