Spaces:
Running
Running
Update assistants.py
Browse files- assistants.py +8 -0
assistants.py
CHANGED
@@ -49,10 +49,18 @@ def get_assistant():
|
|
49 |
global assistant
|
50 |
return assistant
|
51 |
|
|
|
|
|
|
|
|
|
52 |
def get_thread():
|
53 |
global thread
|
54 |
return thread
|
55 |
|
|
|
|
|
|
|
|
|
56 |
def create_assistant():
|
57 |
assistant = openai_client.beta.assistants.create(
|
58 |
name="Python Coding Assistant",
|
|
|
49 |
global assistant
|
50 |
return assistant
|
51 |
|
52 |
+
def set_assistant(a):
|
53 |
+
global assistant
|
54 |
+
assistant = a
|
55 |
+
|
56 |
def get_thread():
|
57 |
global thread
|
58 |
return thread
|
59 |
|
60 |
+
def set_thread(t):
|
61 |
+
global thread
|
62 |
+
thread = t
|
63 |
+
|
64 |
def create_assistant():
|
65 |
assistant = openai_client.beta.assistants.create(
|
66 |
name="Python Coding Assistant",
|