baconnier commited on
Commit
026e7c4
·
verified ·
1 Parent(s): 99b7814

Update art_explorer.py

Browse files
Files changed (1) hide show
  1. art_explorer.py +4 -4
art_explorer.py CHANGED
@@ -5,15 +5,15 @@ from openai import OpenAI
5
  from prompts import SYSTEM_PROMPT, format_exploration_prompt, DEFAULT_RESPONSE
6
  from models import ExplorationResponse
7
 
8
- # Enable instructor
9
- instructor.patch()
10
-
11
  class ExplorationPathGenerator:
12
  def __init__(self, api_key: str):
13
- self.client = OpenAI(
 
14
  base_url="https://api.groq.com/openai/v1",
15
  api_key=api_key
16
  )
 
 
17
 
18
  def generate_exploration_path(
19
  self,
 
5
  from prompts import SYSTEM_PROMPT, format_exploration_prompt, DEFAULT_RESPONSE
6
  from models import ExplorationResponse
7
 
 
 
 
8
  class ExplorationPathGenerator:
9
  def __init__(self, api_key: str):
10
+ # Initialize the base client
11
+ base_client = OpenAI(
12
  base_url="https://api.groq.com/openai/v1",
13
  api_key=api_key
14
  )
15
+ # Patch the client with instructor
16
+ self.client = instructor.patch(base_client)
17
 
18
  def generate_exploration_path(
19
  self,