Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,15 +8,14 @@ import instructor
|
|
8 |
from models import ArtHistoryResponse, Location
|
9 |
from variables import CONTEXTUAL_ZOOM_PROMPT, CONTEXTUAL_ZOOM_default_response
|
10 |
|
11 |
-
# Enable instructor
|
12 |
-
instructor.patch()
|
13 |
-
|
14 |
class ArtExplorer:
|
15 |
def __init__(self):
|
16 |
-
|
|
|
17 |
base_url="https://api.groq.com/openai/v1",
|
18 |
api_key=os.environ.get("GROQ_API_KEY")
|
19 |
-
)
|
|
|
20 |
self.current_state = {
|
21 |
"zoom_level": 0,
|
22 |
"selections": {}
|
|
|
8 |
from models import ArtHistoryResponse, Location
|
9 |
from variables import CONTEXTUAL_ZOOM_PROMPT, CONTEXTUAL_ZOOM_default_response
|
10 |
|
|
|
|
|
|
|
11 |
class ArtExplorer:
|
12 |
def __init__(self):
|
13 |
+
# Initialize OpenAI client with instructor patch
|
14 |
+
self.client = instructor.patch(openai.OpenAI(
|
15 |
base_url="https://api.groq.com/openai/v1",
|
16 |
api_key=os.environ.get("GROQ_API_KEY")
|
17 |
+
))
|
18 |
+
|
19 |
self.current_state = {
|
20 |
"zoom_level": 0,
|
21 |
"selections": {}
|