Aqdas commited on
Commit
8218386
·
1 Parent(s): d98fba1

Update assistant_api.py

Browse files
Files changed (1) hide show
  1. assistant_api.py +2 -1
assistant_api.py CHANGED
@@ -1,7 +1,8 @@
1
  class MathTutor:
2
  def __init__(self):
3
  from openai import OpenAI
4
- self.client = OpenAI()
 
5
 
6
  self.my_assistant = self.client.beta.assistants.create(
7
  instructions="You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
 
1
  class MathTutor:
2
  def __init__(self):
3
  from openai import OpenAI
4
+ import os
5
+ self.client = OpenAI(api_key=os.environ['openai_api_key'])
6
 
7
  self.my_assistant = self.client.beta.assistants.create(
8
  instructions="You are a personal math tutor. When asked a question, write and run Python code to answer the question.",