Spaces:
Sleeping
Sleeping
commit
Browse files
agent.py
CHANGED
|
@@ -828,10 +828,11 @@ class BasicAgent:
|
|
| 828 |
# ๊ทธ๋ํ๋ ๋ชจ๋ ๋ก๋ ์ ์ปดํ์ผ๋จ. ์ฌ๊ธฐ์๋ ์ํ๋ง ์๋ฆผ.
|
| 829 |
print("โ
GAIA Agent initialized (LangGraph StateGraph)")
|
| 830 |
|
| 831 |
-
def __call__(self, question: str) -> str:
|
| 832 |
"""
|
| 833 |
-
app.py
|
| 834 |
-
|
|
|
|
| 835 |
"""
|
| 836 |
state: AgentState = {
|
| 837 |
"question": question,
|
|
@@ -842,6 +843,9 @@ class BasicAgent:
|
|
| 842 |
"steps": 0,
|
| 843 |
}
|
| 844 |
|
| 845 |
-
|
| 846 |
-
|
|
|
|
|
|
|
|
|
|
| 847 |
return clean_final_answer(out.get("answer", ""))
|
|
|
|
| 828 |
# ๊ทธ๋ํ๋ ๋ชจ๋ ๋ก๋ ์ ์ปดํ์ผ๋จ. ์ฌ๊ธฐ์๋ ์ํ๋ง ์๋ฆผ.
|
| 829 |
print("โ
GAIA Agent initialized (LangGraph StateGraph)")
|
| 830 |
|
| 831 |
+
def __call__(self, question: str, **kwargs) -> str:
|
| 832 |
"""
|
| 833 |
+
app.py / Gradio / HF OAuth ๋ํผ๊ฐ
|
| 834 |
+
task_id ๊ฐ์ keyword argument๋ฅผ ๋๊ฒจ๋
|
| 835 |
+
๋ฌด์กฐ๊ฑด ๋ฌด์ํ๊ณ question๋ง ์ฒ๋ฆฌํ๋ค.
|
| 836 |
"""
|
| 837 |
state: AgentState = {
|
| 838 |
"question": question,
|
|
|
|
| 843 |
"steps": 0,
|
| 844 |
}
|
| 845 |
|
| 846 |
+
out = GRAPH.invoke(
|
| 847 |
+
state,
|
| 848 |
+
config={"recursion_limit": 12}
|
| 849 |
+
)
|
| 850 |
+
|
| 851 |
return clean_final_answer(out.get("answer", ""))
|