Event types
BaseEvent #
Bases: BaseModel
Parameters:
Name | Type | Description | Default |
---|---|---|---|
timestamp
|
datetime
|
|
datetime.datetime(2024, 11, 20, 15, 17, 24, 599555)
|
id_
|
str
|
|
'f97ff32d-207f-4ebd-aa9b-5b71d0a2a275'
|
span_id
|
str | None
|
|
None
|
tags
|
Dict[str, Any]
|
|
{}
|
Source code in llama-index-core/llama_index/core/instrumentation/events/base.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
class_name
classmethod
#
class_name() -> str
Return class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/base.py
19 20 21 22 |
|
dict #
dict(**kwargs: Any) -> Dict[str, Any]
Keep for backwards compatibility.
Source code in llama-index-core/llama_index/core/instrumentation/events/base.py
24 25 26 |
|
AgentChatWithStepEndEvent #
Bases: BaseEvent
AgentChatWithStepEndEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
response
|
Optional[AGENT_CHAT_RESPONSE_TYPE]
|
Agent chat response. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
validate_response
classmethod
#
validate_response(values: Any) -> Any
Validate response.
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
validate_response_type
classmethod
#
validate_response_type(response: Any) -> Any
Validate response type.
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
102 103 104 105 |
|
AgentChatWithStepStartEvent #
Bases: BaseEvent
AgentChatWithStepStartEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_msg
|
str
|
User input message. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
57 58 59 60 |
|
AgentRunStepEndEvent #
Bases: BaseEvent
AgentRunStepEndEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
step_output
|
TaskStepOutput
|
Task step output. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
42 43 44 45 |
|
AgentRunStepStartEvent #
Bases: BaseEvent
AgentRunStepStartEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task_id
|
str
|
Task ID. |
required |
step
|
Optional[TaskStep]
|
Task step. |
required |
input
|
Optional[str]
|
Optional input. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
27 28 29 30 |
|
AgentToolCallEvent #
Bases: BaseEvent
AgentToolCallEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arguments
|
str
|
Arguments. |
required |
tool
|
ToolMetadata
|
Tool metadata. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
119 120 121 122 |
|
StreamChatDeltaReceivedEvent #
Bases: BaseEvent
StreamChatDeltaReceivedEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
delta
|
str
|
Delta received from the stream chat. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
54 55 56 57 |
|
StreamChatEndEvent #
Bases: BaseEvent
StreamChatEndEvent.
Fired at the end of writing to the stream chat-engine queue.
Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
16 17 18 19 20 21 22 23 24 25 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
22 23 24 25 |
|
StreamChatErrorEvent #
Bases: BaseEvent
StreamChatErrorEvent.
Fired when an exception is raised during the stream chat-engine operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exception
|
Exception
|
Exception raised during the stream chat operation. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
39 40 41 42 |
|
StreamChatStartEvent #
Bases: BaseEvent
StreamChatStartEvent.
Fired at the start of writing to the stream chat-engine queue.
Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
4 5 6 7 8 9 10 11 12 13 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
10 11 12 13 |
|
EmbeddingEndEvent #
Bases: BaseEvent
EmbeddingEndEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
chunks
|
List[str]
|
List of chunks. |
required |
embeddings
|
List[List[float]]
|
List of embeddings. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/embedding.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/embedding.py
35 36 37 38 |
|
EmbeddingStartEvent #
Bases: BaseEvent
EmbeddingStartEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_dict
|
dict
|
Model dictionary containing details about the embedding model. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/embedding.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/embedding.py
17 18 19 20 |
|
LLMChatEndEvent #
Bases: BaseEvent
LLMChatEndEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
messages
|
List[ChatMessage]
|
List of chat messages. |
required |
response
|
Optional[ChatResponse]
|
Last chat response. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
197 198 199 200 |
|
LLMChatStartEvent #
Bases: BaseEvent
LLMChatStartEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
messages
|
List[ChatMessage]
|
List of chat messages. |
required |
additional_kwargs
|
dict
|
Additional keyword arguments. |
required |
model_dict
|
dict
|
Model dictionary. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
163 164 165 166 |
|
LLMCompletionEndEvent #
Bases: BaseEvent
LLMCompletionEndEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prompt
|
str
|
The prompt to be completed. |
required |
response
|
CompletionResponse
|
Completion response. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
143 144 145 146 |
|
LLMCompletionStartEvent #
Bases: BaseEvent
LLMCompletionStartEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prompt
|
str
|
The prompt to be completed. |
required |
additional_kwargs
|
dict
|
Additional keyword arguments. |
required |
model_dict
|
dict
|
Model dictionary. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
109 110 111 112 |
|
LLMPredictEndEvent #
Bases: BaseEvent
LLMPredictEndEvent.
The result of an llm.predict() call.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
output
|
str
|
Output. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
40 41 42 43 |
|
LLMPredictStartEvent #
Bases: BaseEvent
LLMPredictStartEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
template
|
BasePromptTemplate
|
Prompt template. |
required |
template_args
|
Optional[dict]
|
Prompt template arguments. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
23 24 25 26 |
|
QueryEndEvent #
Bases: BaseEvent
QueryEndEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
QueryType
|
Query as a string or query bundle. |
required |
response
|
RESPONSE_TYPE
|
Response. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/query.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/query.py
32 33 34 35 |
|
QueryStartEvent #
Bases: BaseEvent
QueryStartEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
QueryType
|
Query as a string or query bundle. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/query.py
6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/query.py
15 16 17 18 |
|
RetrievalEndEvent #
Bases: BaseEvent
RetrievalEndEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
str_or_query_bundle
|
QueryType
|
Query bundle. |
required |
nodes
|
List[NodeWithScore]
|
List of nodes with scores. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/retrieval.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/retrieval.py
32 33 34 35 |
|
RetrievalStartEvent #
Bases: BaseEvent
RetrievalStartEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
str_or_query_bundle
|
QueryType
|
Query bundle. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/retrieval.py
6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/retrieval.py
15 16 17 18 |
|
GetResponseEndEvent #
Bases: BaseEvent
GetResponseEndEvent.
Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
57 58 59 60 61 62 63 64 65 66 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
63 64 65 66 |
|
GetResponseStartEvent #
Bases: BaseEvent
GetResponseStartEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query_str
|
str
|
Query string. |
required |
text_chunks
|
List[str]
|
List of text chunks. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
51 52 53 54 |
|
SynthesizeEndEvent #
Bases: BaseEvent
SynthesizeEndEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
QueryType
|
Query as a string or query bundle. |
required |
response
|
RESPONSE_TYPE
|
Response. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
34 35 36 37 |
|
SynthesizeStartEvent #
Bases: BaseEvent
SynthesizeStartEvent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
QueryType
|
Query as a string or query bundle. |
required |
Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
class_name
classmethod
#
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
17 18 19 20 |
|