Spaces:
Runtime error
Runtime error
fix: helicone integration
Browse files- chat_settings.py +3 -2
chat_settings.py
CHANGED
@@ -19,6 +19,8 @@ def get_initial_message():
|
|
19 |
|
20 |
|
21 |
def get_chatgpt_response(messages, model):
|
|
|
|
|
22 |
intermediate_results = []
|
23 |
|
24 |
while True:
|
@@ -28,8 +30,7 @@ def get_chatgpt_response(messages, model):
|
|
28 |
functions=ADD_DECIMAL_AND_HEXADECIMAL_FUNCTION_SCHEMA,
|
29 |
temperature=0,
|
30 |
headers={
|
31 |
-
"Helicone-Auth":
|
32 |
-
"Helicone-Cache-Enabled": "true",
|
33 |
}
|
34 |
)
|
35 |
|
|
|
19 |
|
20 |
|
21 |
def get_chatgpt_response(messages, model):
|
22 |
+
openai.api_base = "https://oai.hconeai.com/v1"
|
23 |
+
HELICONE_API_KEY = os.getenv("HELICONE_API_KEY")
|
24 |
intermediate_results = []
|
25 |
|
26 |
while True:
|
|
|
30 |
functions=ADD_DECIMAL_AND_HEXADECIMAL_FUNCTION_SCHEMA,
|
31 |
temperature=0,
|
32 |
headers={
|
33 |
+
"Helicone-Auth": f"Bearer {HELICONE_API_KEY}",
|
|
|
34 |
}
|
35 |
)
|
36 |
|