Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -63,11 +63,12 @@ class BasicAgent:
|
|
63 |
]
|
64 |
|
65 |
ingredient_tool = FunctionTool.from_defaults(
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
)
|
70 |
-
|
|
|
71 |
|
72 |
# Crea un'istanza di OpenAI
|
73 |
llm = OpenAI(
|
@@ -81,7 +82,8 @@ class BasicAgent:
|
|
81 |
|
82 |
# Imposta le impostazioni tramite Settings
|
83 |
Settings.llm=llm
|
84 |
-
|
|
|
85 |
|
86 |
self.client = OpenAIClient(api_key=openai_api_key)
|
87 |
|
|
|
63 |
]
|
64 |
|
65 |
ingredient_tool = FunctionTool.from_defaults(
|
66 |
+
name="extract_ingredients",
|
67 |
+
fn=extract_ingredients,
|
68 |
+
description="Extracts and returns a comma-separated, alphabetized list of ingredients for a pie filling from a transcription string."
|
69 |
+
)
|
70 |
+
|
71 |
+
Settings.tools = [ingredient_tool]
|
72 |
|
73 |
# Crea un'istanza di OpenAI
|
74 |
llm = OpenAI(
|
|
|
82 |
|
83 |
# Imposta le impostazioni tramite Settings
|
84 |
Settings.llm=llm
|
85 |
+
|
86 |
+
logging.basicConfig(level=logging.DEBUG)
|
87 |
|
88 |
self.client = OpenAIClient(api_key=openai_api_key)
|
89 |
|