Skip to content

Event types

Bases: BaseModel

Source code in llama-index-core/llama_index/core/instrumentation/events/base.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class BaseEvent(BaseModel):
    timestamp: datetime = Field(default_factory=lambda: datetime.now())
    id_: str = Field(default_factory=lambda: uuid4())
    span_id: str = Field(default_factory=str)

    @classmethod
    def class_name(cls):
        """Return class name."""
        return "BaseEvent"

    class Config:
        arbitrary_types_allowed = True
        copy_on_model_validation = "deep"

    def dict(self, **kwargs: Any) -> Dict[str, Any]:
        data = super().dict(**kwargs)
        data["class_name"] = self.class_name()
        return data

class_name classmethod #

class_name()

Return class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/base.py
12
13
14
15
@classmethod
def class_name(cls):
    """Return class name."""
    return "BaseEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
26
27
28
29
30
class AgentChatWithStepEndEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "AgentChatWithStepEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
27
28
29
30
@classmethod
def class_name(cls):
    """Class name."""
    return "AgentChatWithStepEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
19
20
21
22
23
class AgentChatWithStepStartEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "AgentChatWithStepStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
20
21
22
23
@classmethod
def class_name(cls):
    """Class name."""
    return "AgentChatWithStepStartEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
12
13
14
15
16
class AgentRunStepEndEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "AgentRunStepEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
13
14
15
16
@classmethod
def class_name(cls):
    """Class name."""
    return "AgentRunStepEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
5
6
7
8
9
class AgentRunStepStartEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "AgentRunStepStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
6
7
8
9
@classmethod
def class_name(cls):
    """Class name."""
    return "AgentRunStepStartEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
33
34
35
36
37
38
39
40
class AgentToolCallEvent(BaseEvent):
    arguments: str
    tool: ToolMetadata

    @classmethod
    def class_name(cls):
        """Class name."""
        return "AgentToolCallEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/agent.py
37
38
39
40
@classmethod
def class_name(cls):
    """Class name."""
    return "AgentToolCallEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
25
26
27
28
29
30
31
class StreamChatDeltaReceivedEvent(BaseEvent):
    delta: str

    @classmethod
    def class_name(cls):
        """Class name."""
        return "StreamChatDeltaReceivedEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
28
29
30
31
@classmethod
def class_name(cls):
    """Class name."""
    return "StreamChatDeltaReceivedEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
11
12
13
14
15
class StreamChatEndEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "StreamChatEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
12
13
14
15
@classmethod
def class_name(cls):
    """Class name."""
    return "StreamChatEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
18
19
20
21
22
class StreamChatErrorEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "StreamChatErrorEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
19
20
21
22
@classmethod
def class_name(cls):
    """Class name."""
    return "StreamChatErrorEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
4
5
6
7
8
class StreamChatStartEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "StreamChatStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/chat_engine.py
5
6
7
8
@classmethod
def class_name(cls):
    """Class name."""
    return "StreamChatStartEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/embedding.py
15
16
17
18
19
20
21
22
class EmbeddingEndEvent(BaseEvent):
    chunks: List[str]
    embeddings: List[List[float]]

    @classmethod
    def class_name(cls):
        """Class name."""
        return "EmbeddingEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/embedding.py
19
20
21
22
@classmethod
def class_name(cls):
    """Class name."""
    return "EmbeddingEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/embedding.py
 6
 7
 8
 9
10
11
12
class EmbeddingStartEvent(BaseEvent):
    model_dict: dict

    @classmethod
    def class_name(cls):
        """Class name."""
        return "EmbeddingStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/embedding.py
 9
10
11
12
@classmethod
def class_name(cls):
    """Class name."""
    return "EmbeddingStartEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
81
82
83
84
85
86
87
88
class LLMChatEndEvent(BaseEvent):
    messages: List[ChatMessage]
    response: ChatResponse

    @classmethod
    def class_name(cls):
        """Class name."""
        return "LLMChatEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
85
86
87
88
@classmethod
def class_name(cls):
    """Class name."""
    return "LLMChatEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
60
61
62
63
64
65
66
67
68
class LLMChatStartEvent(BaseEvent):
    messages: List[ChatMessage]
    additional_kwargs: dict
    model_dict: dict

    @classmethod
    def class_name(cls):
        """Class name."""
        return "LLMChatStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
65
66
67
68
@classmethod
def class_name(cls):
    """Class name."""
    return "LLMChatStartEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
50
51
52
53
54
55
56
57
class LLMCompletionEndEvent(BaseEvent):
    prompt: str
    response: CompletionResponse

    @classmethod
    def class_name(cls):
        """Class name."""
        return "LLMCompletionEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
54
55
56
57
@classmethod
def class_name(cls):
    """Class name."""
    return "LLMCompletionEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
39
40
41
42
43
44
45
46
47
class LLMCompletionStartEvent(BaseEvent):
    prompt: str
    additional_kwargs: dict
    model_dict: dict

    @classmethod
    def class_name(cls):
        """Class name."""
        return "LLMCompletionStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
44
45
46
47
@classmethod
def class_name(cls):
    """Class name."""
    return "LLMCompletionStartEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
18
19
20
21
22
class LLMPredictEndEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "LLMPredictEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
19
20
21
22
@classmethod
def class_name(cls):
    """Class name."""
    return "LLMPredictEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
11
12
13
14
15
class LLMPredictStartEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "LLMPredictStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/llm.py
12
13
14
15
@classmethod
def class_name(cls):
    """Class name."""
    return "LLMPredictStartEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/query.py
11
12
13
14
15
class QueryEndEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "QueryEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/query.py
12
13
14
15
@classmethod
def class_name(cls):
    """Class name."""
    return "QueryEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/query.py
4
5
6
7
8
class QueryStartEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "QueryStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/query.py
5
6
7
8
@classmethod
def class_name(cls):
    """Class name."""
    return "QueryStartEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/retrieval.py
15
16
17
18
19
20
21
22
class RetrievalEndEvent(BaseEvent):
    str_or_query_bundle: QueryType
    nodes: List[NodeWithScore]

    @classmethod
    def class_name(cls):
        """Class name."""
        return "RetrievalEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/retrieval.py
19
20
21
22
@classmethod
def class_name(cls):
    """Class name."""
    return "RetrievalEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/retrieval.py
 6
 7
 8
 9
10
11
12
class RetrievalStartEvent(BaseEvent):
    str_or_query_bundle: QueryType

    @classmethod
    def class_name(cls):
        """Class name."""
        return "RetrievalStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/retrieval.py
 9
10
11
12
@classmethod
def class_name(cls):
    """Class name."""
    return "RetrievalStartEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
32
33
34
35
36
class GetResponseEndEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "GetResponseEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
33
34
35
36
@classmethod
def class_name(cls):
    """Class name."""
    return "GetResponseEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
25
26
27
28
29
class GetResponseStartEvent(BaseEvent):
    @classmethod
    def class_name(cls):
        """Class name."""
        return "GetResponseStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
26
27
28
29
@classmethod
def class_name(cls):
    """Class name."""
    return "GetResponseStartEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
15
16
17
18
19
20
21
22
class SynthesizeEndEvent(BaseEvent):
    query: QueryType
    response: RESPONSE_TYPE

    @classmethod
    def class_name(cls):
        """Class name."""
        return "SynthesizeEndEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
19
20
21
22
@classmethod
def class_name(cls):
    """Class name."""
    return "SynthesizeEndEvent"

Bases: BaseEvent

Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
 6
 7
 8
 9
10
11
12
class SynthesizeStartEvent(BaseEvent):
    query: QueryType

    @classmethod
    def class_name(cls):
        """Class name."""
        return "SynthesizeStartEvent"

class_name classmethod #

class_name()

Class name.

Source code in llama-index-core/llama_index/core/instrumentation/events/synthesis.py
 9
10
11
12
@classmethod
def class_name(cls):
    """Class name."""
    return "SynthesizeStartEvent"