Re-exported from
fiddler_otel.span_wrapper.FiddlerGeneration.enter()
Enter context and set LLM type.Returns
FiddlerGeneration
set_model()
Set the LLM model name (gen_ai.request.model).set_system()
Set the LLM system/provider (gen_ai.system).set_system_prompt()
Set the system prompt (gen_ai.llm.input.system).set_user_prompt()
Set the user prompt (gen_ai.llm.input.user).Parameters
Plain text string, or a list of content parts in OpenAI
multimodal format (e.g.
[{'type': 'text', 'text': '...'}, {'type': 'image_url', 'image_url': {'url': 'data:...'}}]).
Lists are auto-serialized to JSON.set_completion()
Set the LLM completion/output (gen_ai.llm.output).set_usage()
Set token usage information (gen_ai.usage.*).Parameters
Number of input/prompt tokens.
Number of output/completion tokens.
Total tokens; computed from input + output when omitted.
set_context()
Set additional context (gen_ai.llm.context).set_messages()
Set input messages in OpenAI chat format (gen_ai.input.messages). Accepts simple format:[{'role': 'user', 'content': '...'}]
Auto-converts to OTel format with parts.
set_output_messages()
Set output messages in OpenAI chat format (gen_ai.output.messages). Accepts simple format:[{'role': 'assistant', 'content': '...'}]
Auto-converts to OTel format with parts.
set_tool_definitions()
Set available tool definitions for this LLM call (gen_ai.tool.definitions).See the canonical reference for the full description and examples.