Skip to content

1.4.1

Compare
Choose a tag to compare
@maxdeichmann maxdeichmann released this 16 Nov 21:38
· 813 commits to main since this release

Configure the langfuse connection via the openai integration.

from langfuse.openai import openai

openai.langfuse_public_key = 'public-key'
openai.langfuse_secret_key = 'secret-key'
openai.langfuse_host = 'host'

completion = openai.chat.completions.create(
  name="test-chat",
  model="gpt-3.5-turbo",
  messages=[
      {"role": "system", "content": "You are a very accurate calculator. You output only the result of the calculation."},
      {"role": "user", "content": "1 + 1 = "}],
  temperature=0,
  metadata={"someMetadataKey": "someValue"},
)