Spaces:
Runtime error
Runtime error
Commit
·
4a22a8f
1
Parent(s):
38406d1
- .DS_Store +0 -0
- .cache/42/cache.db +0 -0
- .chainlit/config.toml +66 -0
- __pycache__/agent.cpython-311.pyc +0 -0
- __pycache__/app.cpython-311.pyc +0 -0
- agent.py +1 -0
- logs/conversations_1698339138.683816.json +42 -0
.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
.cache/42/cache.db
ADDED
|
Binary file (53.2 kB). View file
|
|
|
.chainlit/config.toml
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[project]
|
| 2 |
+
# Whether to enable telemetry (default: true). No personal data is collected.
|
| 3 |
+
enable_telemetry = true
|
| 4 |
+
|
| 5 |
+
# List of environment variables to be provided by each user to use the app.
|
| 6 |
+
user_env = []
|
| 7 |
+
|
| 8 |
+
# Duration (in seconds) during which the session is saved when the connection is lost
|
| 9 |
+
session_timeout = 3600
|
| 10 |
+
|
| 11 |
+
# Enable third parties caching (e.g LangChain cache)
|
| 12 |
+
cache = false
|
| 13 |
+
|
| 14 |
+
# Follow symlink for asset mount (see https://github.com/Chainlit/chainlit/issues/317)
|
| 15 |
+
# follow_symlink = false
|
| 16 |
+
|
| 17 |
+
[features]
|
| 18 |
+
# Show the prompt playground
|
| 19 |
+
prompt_playground = true
|
| 20 |
+
|
| 21 |
+
[UI]
|
| 22 |
+
# Name of the app and chatbot.
|
| 23 |
+
name = "Chatbot"
|
| 24 |
+
|
| 25 |
+
# Description of the app and chatbot. This is used for HTML tags.
|
| 26 |
+
# description = ""
|
| 27 |
+
|
| 28 |
+
# Large size content are by default collapsed for a cleaner ui
|
| 29 |
+
default_collapse_content = true
|
| 30 |
+
|
| 31 |
+
# The default value for the expand messages settings.
|
| 32 |
+
default_expand_messages = false
|
| 33 |
+
|
| 34 |
+
# Hide the chain of thought details from the user in the UI.
|
| 35 |
+
hide_cot = false
|
| 36 |
+
|
| 37 |
+
# Link to your github repo. This will add a github button in the UI's header.
|
| 38 |
+
# github = ""
|
| 39 |
+
|
| 40 |
+
# Specify a CSS file that can be used to customize the user interface.
|
| 41 |
+
# The CSS file can be served from the public directory or via an external link.
|
| 42 |
+
# custom_css = "/public/test.css"
|
| 43 |
+
|
| 44 |
+
# Override default MUI light theme. (Check theme.ts)
|
| 45 |
+
[UI.theme.light]
|
| 46 |
+
#background = "#FAFAFA"
|
| 47 |
+
#paper = "#FFFFFF"
|
| 48 |
+
|
| 49 |
+
[UI.theme.light.primary]
|
| 50 |
+
#main = "#F80061"
|
| 51 |
+
#dark = "#980039"
|
| 52 |
+
#light = "#FFE7EB"
|
| 53 |
+
|
| 54 |
+
# Override default MUI dark theme. (Check theme.ts)
|
| 55 |
+
[UI.theme.dark]
|
| 56 |
+
#background = "#FAFAFA"
|
| 57 |
+
#paper = "#FFFFFF"
|
| 58 |
+
|
| 59 |
+
[UI.theme.dark.primary]
|
| 60 |
+
#main = "#F80061"
|
| 61 |
+
#dark = "#980039"
|
| 62 |
+
#light = "#FFE7EB"
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
[meta]
|
| 66 |
+
generated_by = "0.7.2"
|
__pycache__/agent.cpython-311.pyc
ADDED
|
Binary file (5.41 kB). View file
|
|
|
__pycache__/app.cpython-311.pyc
ADDED
|
Binary file (11.3 kB). View file
|
|
|
agent.py
CHANGED
|
@@ -6,6 +6,7 @@ code and User Proxy agent for executing actions.
|
|
| 6 |
Written by: Antoine Ross - October 2023
|
| 7 |
"""
|
| 8 |
import os
|
|
|
|
| 9 |
import autogen
|
| 10 |
import logging
|
| 11 |
import pprint as pp
|
|
|
|
| 6 |
Written by: Antoine Ross - October 2023
|
| 7 |
"""
|
| 8 |
import os
|
| 9 |
+
import shutil
|
| 10 |
import autogen
|
| 11 |
import logging
|
| 12 |
import pprint as pp
|
logs/conversations_1698339138.683816.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"[{\"content\": \"Reply TERMINATE if the task has been solved at full satisfaction. Otherwise, reply CONTINUE, or the reason why the task is not solved yet.\", \"role\": \"system\"}, {\"content\": \"Access this URL and tell me the contents: https://www.w3schools.com/xml/note.xml\\n\\nDo not say show appreciation in your responses, say only what is necessary. if \\\"Thank you\\\" or \\\"You're welcome\\\" are said in the conversation, then say TERMINATE to indicate the conversation is finished and this is your last message.\", \"role\": \"assistant\"}, {\"content\": \"# filename: read_url.py\\n\\nimport urllib.request\\n\\nurl = \\\"https://www.w3schools.com/xml/note.xml\\\"\\n\\nwith urllib.request.urlopen(url) as response:\\n contents = response.read().decode()\\n\\nprint(contents)\", \"role\": \"user\"}, {\"content\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<note>\\n <to>Tove</to>\\n <from>Jani</from>\\n <heading>Reminder</heading>\\n <body>Don't forget me this weekend!</body>\\n</note>\", \"role\": \"assistant\"}]": {
|
| 3 |
+
"created_at": [
|
| 4 |
+
1
|
| 5 |
+
],
|
| 6 |
+
"cost": [
|
| 7 |
+
0.0007109999999999999
|
| 8 |
+
],
|
| 9 |
+
"token_count": [
|
| 10 |
+
{
|
| 11 |
+
"model": "gpt-3.5-turbo-16k-0613",
|
| 12 |
+
"prompt_tokens": 161,
|
| 13 |
+
"completion_tokens": 57,
|
| 14 |
+
"total_tokens": 218
|
| 15 |
+
}
|
| 16 |
+
]
|
| 17 |
+
},
|
| 18 |
+
"[{\"content\": \"You are a helpful AI assistant.\\nSolve tasks using your coding and language skills.\\nIn the following cases, suggest python code (in a python coding block) or shell script (in a sh coding block) for the user to execute.\\n 1. When you need to collect info, use the code to output the info you need, for example, browse or search the web, download/read a file, print the content of a webpage or a file, get the current date/time, check the operating system. After sufficient info is printed and the task is ready to be solved based on your language skill, you can solve the task by yourself.\\n 2. When you need to perform some task with code, use the code to perform the task and output the result. Finish the task smartly.\\nSolve the task step by step if you need to. If a plan is not provided, explain your plan first. Be clear which step uses code, and which step uses your language skill.\\nWhen using code, you must indicate the script type in the code block. The user cannot provide any other feedback or perform any other action beyond executing the code you suggest. The user can't modify your code. So do not suggest incomplete code which requires users to modify. Don't use a code block if it's not intended to be executed by the user.\\nIf you want the user to save the code in a file before executing it, put # filename: <filename> inside the code block as the first line. Don't include multiple code blocks in one response. Do not ask users to copy and paste the result. Instead, use 'print' function for the output when relevant. Check the execution result returned by the user.\\nIf the result indicates there is an error, fix the error and output the code again. Suggest the full code instead of partial code or code changes. If the error can't be fixed or if the task is not solved even after the code is executed successfully, analyze the problem, revisit your assumption, collect additional info you need, and think of a different approach to try.\\nWhen you find an answer, verify the answer carefully. Include verifiable evidence in your response if possible.\\nReply \\\"TERMINATE\\\" in the end when everything is done.\\n \", \"role\": \"system\"}, {\"content\": \"Access this URL and tell me the contents: https://www.w3schools.com/xml/note.xml\\n\\nDo not say show appreciation in your responses, say only what is necessary. if \\\"Thank you\\\" or \\\"You're welcome\\\" are said in the conversation, then say TERMINATE to indicate the conversation is finished and this is your last message.\", \"role\": \"user\"}, {\"content\": \"# filename: read_url.py\\n\\nimport urllib.request\\n\\nurl = \\\"https://www.w3schools.com/xml/note.xml\\\"\\n\\nwith urllib.request.urlopen(url) as response:\\n contents = response.read().decode()\\n\\nprint(contents)\", \"role\": \"assistant\"}, {\"content\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<note>\\n <to>Tove</to>\\n <from>Jani</from>\\n <heading>Reminder</heading>\\n <body>Don't forget me this weekend!</body>\\n</note>\", \"role\": \"user\"}, {\"content\": \"The contents of the URL \\\"https://www.w3schools.com/xml/note.xml\\\" are as follows:\\n\\n```\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<note>\\n <to>Tove</to>\\n <from>Jani</from>\\n <heading>Reminder</heading>\\n <body>Don't forget me this weekend!</body>\\n</note>\\n```\\n\\nTERMINATE\", \"role\": \"assistant\"}]": {
|
| 19 |
+
"created_at": [
|
| 20 |
+
0,
|
| 21 |
+
2
|
| 22 |
+
],
|
| 23 |
+
"cost": [
|
| 24 |
+
0.00181,
|
| 25 |
+
0.002303
|
| 26 |
+
],
|
| 27 |
+
"token_count": [
|
| 28 |
+
{
|
| 29 |
+
"model": "gpt-3.5-turbo-16k-0613",
|
| 30 |
+
"prompt_tokens": 542,
|
| 31 |
+
"completion_tokens": 46,
|
| 32 |
+
"total_tokens": 588
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"model": "gpt-3.5-turbo-16k-0613",
|
| 36 |
+
"prompt_tokens": 653,
|
| 37 |
+
"completion_tokens": 86,
|
| 38 |
+
"total_tokens": 739
|
| 39 |
+
}
|
| 40 |
+
]
|
| 41 |
+
}
|
| 42 |
+
}
|