Spaces:
Runtime error
Runtime error
Shroominic
commited on
Commit
·
2b0a7db
1
Parent(s):
18fc95f
fix interface
Browse files
codeinterpreterapi/session.py
CHANGED
|
@@ -152,11 +152,12 @@ class CodeInterpreterSession():
|
|
| 152 |
|
| 153 |
async def generate_response(
|
| 154 |
self,
|
| 155 |
-
|
| 156 |
-
files: list[File]
|
| 157 |
detailed_error: bool = False,
|
| 158 |
) -> CodeInterpreterResponse:
|
| 159 |
""" Generate a Code Interpreter response based on the user's input."""
|
|
|
|
| 160 |
try:
|
| 161 |
await self.input_handler(user_request)
|
| 162 |
response = await self.agent_executor.arun(input=user_request.content)
|
|
|
|
| 152 |
|
| 153 |
async def generate_response(
|
| 154 |
self,
|
| 155 |
+
user_msg: str,
|
| 156 |
+
files: list[File] = [],
|
| 157 |
detailed_error: bool = False,
|
| 158 |
) -> CodeInterpreterResponse:
|
| 159 |
""" Generate a Code Interpreter response based on the user's input."""
|
| 160 |
+
user_request = UserRequest(content=user_msg, files=files)
|
| 161 |
try:
|
| 162 |
await self.input_handler(user_request)
|
| 163 |
response = await self.agent_executor.arun(input=user_request.content)
|