You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm following along with https://magentic.dev/logging-and-tracing/ , but i don't think logfire.instrument_openai() is fully implemented correctly, because i cannot see the response in logfire.
example:
import os
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
import logfire
logfire.configure()
logfire.instrument_openai() # optional, to trace OpenAI API calls
logfire.info('Hello, {name}!', name='world')
from magentic import prompt
from pydantic import BaseModel
class Superhero(BaseModel):
name: str
age: int
power: str
enemies: list[str]
@prompt("Create a Superhero named {name}.")
def create_superhero(name: str) -> Superhero: ...
create_superhero("Monkey Boy")
result:
The text was updated successfully, but these errors were encountered:
@rawwerks You're right! Tool call responses (used for structure outputs in magentic) show correctly in logfire for non-streamed responses, but not when stream=True. I've opened an issue with logfire now pydantic/logfire#542
i'm following along with https://magentic.dev/logging-and-tracing/ , but i don't think
logfire.instrument_openai()
is fully implemented correctly, because i cannot see the response in logfire.example:
result:
The text was updated successfully, but these errors were encountered: