class AiConversation

internal  
 

Associate spans with one conversation, including spans started before its ID is known.

Methods

__construct(string $traceId, string|null $conversationId = null)

Create an association for a conversation in one trace.

void
resolve(string $conversationId)

Resolve a pending conversation without overwriting an inner invocation's ID.

void
attach(Span $span)

Associate a span from this trace with the conversation.

Details

at line 28
__construct(string $traceId, string|null $conversationId = null)

Create an association for a conversation in one trace.

A new conversation starts without an ID, since hypervel/ai creates it when the first turn ends.

Parameters

string $traceId
string|null $conversationId

at line 37
void resolve(string $conversationId)

Resolve a pending conversation without overwriting an inner invocation's ID.

Parameters

string $conversationId

Return Value

void

at line 53
void attach(Span $span)

Associate a span from this trace with the conversation.

Parameters

Span $span

Return Value

void