Docs: Updated workarounds for uploading file to an agent (#9561)

### What problem does this PR solve?


### Type of change


- [x] Documentation Update
This commit is contained in:
writinwaters
2025-08-19 17:40:39 +08:00
committed by GitHub
parent f2c5ad170d
commit d5729e598f

View File

@ -2656,7 +2656,7 @@ Creates a session with an agent.
- Body:
- the required parameters:`str`
- other parameters:
The parameters specified in the **Begin** component.
The variables specified in the **Begin** component.
##### Request example
@ -3000,13 +3000,19 @@ curl --request POST \
- `"session_id"`: (*Body Parameter*)
The ID of the session. If it is not provided, a new session will be generated.
- `"inputs"`: (*Body Parameter*)
Parameters specified in the **Begin** component.
Variables specified in the **Begin** component.
- `"user_id"`: (*Body parameter*), `string`
The optional user-defined ID. Valid *only* when no `session_id` is provided.
:::tip NOTE
For now, this method does *not* support a file type input/variable. As a workaround, use the following to upload a file to an agent:
`http://{address}/v1/canvas/upload/{agent_id}`
*You will get a corresponding file ID from its response body.*
:::
#### Response
success without `session_id` provided and with no parameters specified in the **Begin** component:
success without `session_id` provided and with no variables specified in the **Begin** component:
Stream:
@ -3074,7 +3080,7 @@ Non-stream:
}
```
Success without `session_id` provided and with parameters specified in the **Begin** component:
Success without `session_id` provided and with variables specified in the **Begin** component:
Stream:
@ -3163,7 +3169,7 @@ Non-stream:
}
```
Success with parameters specified in the **Begin** component:
Success with variables specified in the **Begin** component:
Stream: