Spaces:
Sleeping
Sleeping
whymath
commited on
Commit
·
db33c5f
1
Parent(s):
e95e366
Update assistant creation and remove others
Browse files- .gitignore +2 -0
- app.py +4 -4
.gitignore
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
# Byte-compiled / optimized / DLL files
|
| 2 |
__pycache__/
|
| 3 |
*.py[cod]
|
|
|
|
| 1 |
+
bkp/
|
| 2 |
+
|
| 3 |
# Byte-compiled / optimized / DLL files
|
| 4 |
__pycache__/
|
| 5 |
*.py[cod]
|
app.py
CHANGED
|
@@ -14,7 +14,7 @@ load_dotenv()
|
|
| 14 |
start_msg = "Teach2Learn Virtual Student by Jerry Chiang and Yohan Mathew\n\nYou can choose to upload a PDF, or just start chatting"
|
| 15 |
# instructions = "You are a helpful assistant"
|
| 16 |
instructions = "You are a virtual student being taught by the user. You can ask clarifying questions to better understand the user's explanation. Your goal is to ensure that the user understands the concept they are explaining. You can also ask questions to help the user elaborate on their explanation. You can ask questions like 'Can you explain that in simpler terms?' or 'Can you provide an example?'."
|
| 17 |
-
client = AsyncOpenAI()
|
| 18 |
# assistant = client.beta.assistants.create(
|
| 19 |
# name="T2L Virtual Student",
|
| 20 |
# instructions=instructions,
|
|
@@ -24,11 +24,11 @@ assistant = OpenAIAssistantRunnable.create_assistant(
|
|
| 24 |
name="T2L Virtual Student",
|
| 25 |
instructions=instructions,
|
| 26 |
tools=[{"type": "code_interpreter"}],
|
| 27 |
-
model="gpt-3.5-turbo"
|
| 28 |
)
|
| 29 |
print("assistant =", assistant)
|
| 30 |
-
thread = client.beta.threads.create()
|
| 31 |
-
print("thread =", thread)
|
| 32 |
|
| 33 |
|
| 34 |
@cl.on_chat_start
|
|
|
|
| 14 |
start_msg = "Teach2Learn Virtual Student by Jerry Chiang and Yohan Mathew\n\nYou can choose to upload a PDF, or just start chatting"
|
| 15 |
# instructions = "You are a helpful assistant"
|
| 16 |
instructions = "You are a virtual student being taught by the user. You can ask clarifying questions to better understand the user's explanation. Your goal is to ensure that the user understands the concept they are explaining. You can also ask questions to help the user elaborate on their explanation. You can ask questions like 'Can you explain that in simpler terms?' or 'Can you provide an example?'."
|
| 17 |
+
# client = AsyncOpenAI()
|
| 18 |
# assistant = client.beta.assistants.create(
|
| 19 |
# name="T2L Virtual Student",
|
| 20 |
# instructions=instructions,
|
|
|
|
| 24 |
name="T2L Virtual Student",
|
| 25 |
instructions=instructions,
|
| 26 |
tools=[{"type": "code_interpreter"}],
|
| 27 |
+
model="gpt-3.5-turbo"
|
| 28 |
)
|
| 29 |
print("assistant =", assistant)
|
| 30 |
+
# thread = client.beta.threads.create()
|
| 31 |
+
# print("thread =", thread)
|
| 32 |
|
| 33 |
|
| 34 |
@cl.on_chat_start
|