Skip to main content
weave / Conversation A Conversation groups Turns under a single gen_ai.conversation.id. It is not itself an OTel span — children stamp the conversation id onto theirs.

Table of contents

Accessors

Methods

Accessors

agentName

get agentName(): string

Returns

string

Defined in

src/genai/conversation.ts:94

attributes

get attributes(): Attributes

Returns

Attributes

Defined in

src/genai/conversation.ts:106

conversationId

get conversationId(): string

Returns

string

Defined in

src/genai/conversation.ts:102

model

get model(): string

Returns

string

Defined in

src/genai/conversation.ts:98

sessionId

Deprecated. Use Conversation.conversationId instead.
get sessionId(): string

Returns

string

Defined in

src/genai/conversation.ts:111

Methods

end

end(opts?): void

Parameters

NameType
opts?SpanEndOptions

Returns

void

Defined in

src/genai/conversation.ts:168

startTurn

startTurn(opts?): Turn Start a new Turn under this Conversation. The turn inherits the conversation’s conversationId; agentName, agentId, agentDescription, agentVersion and model fall back to the conversation’s values when not provided on opts.

Parameters

NameType
optsTurnInit

Returns

Turn Example
const  = conversation.startTurn();
Example
const  = conversation.startTurn({
  : 'gpt-4o',
  : 'research-bot',
  : 'research-bot-prod',
  : 'Looks up facts on Wikipedia.',
  : '1.4.2',
  : 'What is the weather in Tokyo?',
  : ['You are a helpful weather bot.'],
  : new ('2026-05-29T10:00:00.000Z'),
});

Defined in

src/genai/conversation.ts:156

create

create(opts?): Conversation

Parameters

NameType
optsConversationInit

Returns

Conversation

Defined in

src/genai/conversation.ts:115