llm_response
Method
This is a method of the ContextTraceEmitter class in the context_events module.Emit LLM response event.
Signature
Parameters
str
required
Name of the agent receiving the response
int
default:"0"
Number of tokens in response (deprecated, use completion_tokens)
float
default:"0.0"
Response time in milliseconds
Optional[str]
Reason for completion (stop, length, etc.)
Optional[str]
Optional response content for context replay
int
default:"0"
Number of tokens in the prompt/request
int
default:"0"
Number of tokens in the completion/response
float
default:"0.0"
Estimated cost in USD for this LLM call
Uses
ContextEventtime.time
Source
View on GitHub
praisonaiagents/trace/context_events.py at line 704
