bstraehle commited on
Commit
0200702
1 Parent(s): ca87d3a

Update assistants.py

Browse files
Files changed (1) hide show
  1. assistants.py +8 -0
assistants.py CHANGED
@@ -41,6 +41,14 @@ tools = {
41
  "tavily_search_tool": tavily_search_tool,
42
  }
43
 
 
 
 
 
 
 
 
 
44
  def create_assistant():
45
  assistant = openai_client.beta.assistants.create(
46
  name="Python Coding Assistant",
 
41
  "tavily_search_tool": tavily_search_tool,
42
  }
43
 
44
+ def get_openai_client():
45
+ global openai_client
46
+ return openai_client
47
+
48
+ def set_openai_client(openai_api_key):
49
+ global openai_client
50
+ openai_client = OpenAI(api_key=openai_api_key)
51
+
52
  def create_assistant():
53
  assistant = openai_client.beta.assistants.create(
54
  name="Python Coding Assistant",