Skip to content

Commit 48ed2c6

Browse files
committed
rename
1 parent 323c816 commit 48ed2c6

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

langfuse/openai.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def initialize(self):
188188
if not self._langfuse:
189189
with self._lock:
190190
if not self._langfuse:
191-
self._langfuse = Langfuse(public_key=openai.public_key, secret_key=openai.secret_key, host=openai.host)
191+
self._langfuse = Langfuse(public_key=openai.langfuse_public_key, secret_key=openai.langfuse_secret_key, host=openai.langfuse_host)
192192
return self._langfuse
193193

194194
@classmethod
@@ -205,9 +205,9 @@ def register_tracing(self):
205205
_wrap(resource, self._langfuse, self.initialize),
206206
)
207207

208-
setattr(openai, "public_key", None)
209-
setattr(openai, "secret_key", None)
210-
setattr(openai, "host", None)
208+
setattr(openai, "langfuse_public_key", None)
209+
setattr(openai, "langfuse_secret_key", None)
210+
setattr(openai, "langfuse_host", None)
211211

212212
setattr(openai, "flush_langfuse", self.flush)
213213

tests/test_sdk_setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ def test_openai_configured(httpserver: HTTPServer):
237237
os.environ.pop("LANGFUSE_SECRET_KEY")
238238
os.environ.pop("LANGFUSE_HOST")
239239

240-
openai.public_key = "pk-lf-asdfghjkl"
241-
openai.secret_key = "sk-lf-asdfghjkl"
242-
openai.host = host
240+
openai.langfuse_public_key = "pk-lf-asdfghjkl"
241+
openai.langfuse_secret_key = "sk-lf-asdfghjkl"
242+
openai.langfuse_host = host
243243

244244
openai.chat.completions.create(
245245
model="gpt-3.5-turbo",

0 commit comments

Comments
 (0)