Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
-
# Multimodal message, clear, undo
|
2 |
# File search https://platform.openai.com/docs/api-reference/messages/createMessage
|
3 |
# Matlplotlib chart
|
4 |
# Function: Tavily API
|
|
|
5 |
|
6 |
# https://platform.openai.com/playground/assistants
|
7 |
# https://platform.openai.com/docs/api-reference/assistants/createAssistant
|
@@ -51,17 +52,11 @@ def create_thread(client):
|
|
51 |
|
52 |
return thread
|
53 |
|
54 |
-
def create_message(client, thread, msg):
|
55 |
-
#print(msg)
|
56 |
-
#attachment = "{}"
|
57 |
-
#if msg[files]:
|
58 |
-
# attachment = "{}"
|
59 |
-
|
60 |
message = client.beta.threads.messages.create(
|
61 |
role="user",
|
62 |
thread_id=thread.id,
|
63 |
content=msg["text"],
|
64 |
-
#attachments=[attachment],
|
65 |
)
|
66 |
|
67 |
show_json("message", message)
|
|
|
1 |
+
# Multimodal message, clear, undo https://platform.openai.com/docs/assistants/tools/code-interpreter/passing-files-to-code-interpreter
|
2 |
# File search https://platform.openai.com/docs/api-reference/messages/createMessage
|
3 |
# Matlplotlib chart
|
4 |
# Function: Tavily API
|
5 |
+
# Multi-user thread
|
6 |
|
7 |
# https://platform.openai.com/playground/assistants
|
8 |
# https://platform.openai.com/docs/api-reference/assistants/createAssistant
|
|
|
52 |
|
53 |
return thread
|
54 |
|
55 |
+
def create_message(client, thread, msg):
|
|
|
|
|
|
|
|
|
|
|
56 |
message = client.beta.threads.messages.create(
|
57 |
role="user",
|
58 |
thread_id=thread.id,
|
59 |
content=msg["text"],
|
|
|
60 |
)
|
61 |
|
62 |
show_json("message", message)
|