Update app.py
Browse files
app.py
CHANGED
@@ -50,8 +50,10 @@ class BasicAgent:
|
|
50 |
print("BasicAgent initialization complete.")
|
51 |
|
52 |
def _call_llm_api(self, prompt: str) -> str:
|
53 |
-
"""Call the
|
54 |
try:
|
|
|
|
|
55 |
response = self.llm.text_generation(
|
56 |
prompt,
|
57 |
max_new_tokens=200,
|
@@ -59,6 +61,8 @@ class BasicAgent:
|
|
59 |
top_p=0.95,
|
60 |
repetition_penalty=1.1
|
61 |
)
|
|
|
|
|
62 |
return response
|
63 |
except Exception as e:
|
64 |
print(f"Error calling LLM API: {e}")
|
|
|
50 |
print("BasicAgent initialization complete.")
|
51 |
|
52 |
def _call_llm_api(self, prompt: str) -> str:
|
53 |
+
"""Call the model and return the raw text output."""
|
54 |
try:
|
55 |
+
print("=== Sending prompt ===")
|
56 |
+
print(prompt[:500])
|
57 |
response = self.llm.text_generation(
|
58 |
prompt,
|
59 |
max_new_tokens=200,
|
|
|
61 |
top_p=0.95,
|
62 |
repetition_penalty=1.1
|
63 |
)
|
64 |
+
print("=== Received response ===")
|
65 |
+
print(response)
|
66 |
return response
|
67 |
except Exception as e:
|
68 |
print(f"Error calling LLM API: {e}")
|