This repository was archived by the owner on Aug 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -42,14 +42,19 @@ const thread = await client.thread({ id: uuidv4(), participantId }).upsert();
4242``` ts
4343// Create the first step
4444const step = await thread
45- .step ({ name: userIdentifier , type: ' user_message' , output: ' Hello' })
45+ .step ({
46+ name: userIdentifier ,
47+ type: ' user_message' ,
48+ output: { text: ' Hello' },
49+ })
4650 .send ();
4751
52+
4853// Create a child llm step
4954const step = step .step ({
5055 name: ' gpt-4' ,
5156 type: ' llm' ,
52- input: ' Hello'
57+ input: { text: ' Hello' }
5358});
5459
5560const stream = await openai .chat .completions .create ({
@@ -58,13 +63,6 @@ const stream = await openai.chat.completions.create({
5863 messages: [{ role: ' user' , content: ' Say this is a test' }]
5964});
6065
61- // Create a child llm step
62- const step = step .step ({
63- name: ' gpt-4' ,
64- type: ' llm' ,
65- input: ' Hello'
66- });
67-
6866// Instrument the openai response
6967await client .instrumentation .openai (step , stream );
7068
@@ -107,7 +105,7 @@ const score = await client.api.createScore({
107105 stepId: finalStep .id ! ,
108106 name: ' user-feedback' ,
109107 value: 1 ,
110- type: ' Human ' ,
108+ type: ' HUMAN ' ,
111109 comment: ' Great!'
112110});
113111```
You can’t perform that action at this time.
0 commit comments