Skip to content

Commit edb3aa2

Browse files
Small updates to make it clear that stateless runs do not persist threads (#1706)
## Overview Reduce confusion. Don't associate threads with stateless runs. Some users are still getting confused by this. ## Type of change **Type:** Update existing documentation ## Related issues/PRs n/a ## Checklist <!-- Put an 'x' in all boxes that apply --> - [x] I have read the [contributing guidelines](README.md) - [x] I have tested my changes locally using `docs dev` - [x] All code examples have been tested and work correctly - [x] I have used **root relative** paths for internal links - [x] I have updated navigation in `src/docs.json` if needed ## Additional notes n/a
1 parent 4939636 commit edb3aa2

File tree

1 file changed

+23
-27
lines changed

1 file changed

+23
-27
lines changed

src/langsmith/stateless-runs.mdx

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ First, let's setup our client:
1616
client = get_client(url=<DEPLOYMENT_URL>)
1717
# Using the graph deployed with the name "agent"
1818
assistant_id = "agent"
19-
# create thread
20-
thread = await client.threads.create()
2119
```
2220
</Tab>
2321
<Tab title="Javascript">
@@ -27,8 +25,6 @@ First, let's setup our client:
2725
const client = new Client({ apiUrl: <DEPLOYMENT_URL> });
2826
// Using the graph deployed with the name "agent"
2927
const assistantId = "agent";
30-
// create thread
31-
const thread = await client.threads.create();
3228
```
3329
</Tab>
3430
<Tab title="CURL">
@@ -159,28 +155,28 @@ Output:
159155

160156
```
161157
{
162-
'messages': [
163-
{
164-
'content': 'Hello! My name is Bagatur and I am 26 years old.',
165-
'additional_kwargs': {},
166-
'response_metadata': {},
167-
'type': 'human',
168-
'name': None,
169-
'id': '5e088543-62c2-43de-9d95-6086ad7f8b48',
170-
'example': False}
171-
,
172-
{
173-
'content': "Hello Bagatur! It's nice to meet you. Thank you for introducing yourself and sharing your age. Is there anything specific you'd like to know or discuss? I'm here to help with any questions or topics you'd like to explore.",
174-
'additional_kwargs': {},
175-
'response_metadata': {},
176-
'type': 'ai',
177-
'name': None,
178-
'id': 'run-d6361e8d-4d4c-45bd-ba47-39520257f773',
179-
'example': False,
180-
'tool_calls': [],
181-
'invalid_tool_calls': [],
182-
'usage_metadata': None
183-
}
184-
]
158+
'messages': [
159+
{
160+
'content': 'Hello! My name is Bagatur and I am 26 years old.',
161+
'additional_kwargs': {},
162+
'response_metadata': {},
163+
'type': 'human',
164+
'name': None,
165+
'id': '5e088543-62c2-43de-9d95-6086ad7f8b48',
166+
'example': False
167+
},
168+
{
169+
'content': 'Hello Bagatur! It's nice to meet you. Thank you for introducing yourself and sharing your age. Is there anything specific you'd like to know or discuss? I'm here to help with any questions or topics you'd like to explore.',
170+
'additional_kwargs': {},
171+
'response_metadata': {},
172+
'type': 'ai',
173+
'name': None,
174+
'id': 'run-d6361e8d-4d4c-45bd-ba47-39520257f773',
175+
'example': False,
176+
'tool_calls': [],
177+
'invalid_tool_calls': [],
178+
'usage_metadata': None
179+
}
180+
]
185181
}
186182
```

0 commit comments

Comments
 (0)