Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -83,6 +83,7 @@ def stream_chat(
|
|
83 |
|
84 |
print(f'history: {conversation}')
|
85 |
|
|
|
86 |
local_namespace = {}
|
87 |
exec(tools, globals(), local_namespace)
|
88 |
function_params = local_namespace.get('function_params', {})
|
@@ -114,7 +115,7 @@ def stream_chat(
|
|
114 |
|
115 |
|
116 |
|
117 |
-
tools_schema = """
|
118 |
"name": "get_current_weather",
|
119 |
"description": "Get the current weather",
|
120 |
"parameters": {
|
@@ -132,7 +133,7 @@ tools_schema = """function_params = {
|
|
132 |
},
|
133 |
"required": ["location", "format"],
|
134 |
},
|
135 |
-
|
136 |
|
137 |
chatbot = gr.Chatbot(height = 600, placeholder = PLACEHOLDER)
|
138 |
with gr.Blocks(theme="citrus", css=CSS) as demo:
|
|
|
83 |
|
84 |
print(f'history: {conversation}')
|
85 |
|
86 |
+
tools = f'function_params = {{{tools}}}'
|
87 |
local_namespace = {}
|
88 |
exec(tools, globals(), local_namespace)
|
89 |
function_params = local_namespace.get('function_params', {})
|
|
|
115 |
|
116 |
|
117 |
|
118 |
+
tools_schema = """
|
119 |
"name": "get_current_weather",
|
120 |
"description": "Get the current weather",
|
121 |
"parameters": {
|
|
|
133 |
},
|
134 |
"required": ["location", "format"],
|
135 |
},
|
136 |
+
"""
|
137 |
|
138 |
chatbot = gr.Chatbot(height = 600, placeholder = PLACEHOLDER)
|
139 |
with gr.Blocks(theme="citrus", css=CSS) as demo:
|