mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-19 07:59:34 +00:00
update API examples for projects usage
This commit is contained in:
parent
e24b304ecb
commit
a2567b4af3
2 changed files with 6 additions and 6 deletions
|
|
@ -25,7 +25,7 @@ Send messages to Agent Zero and receive responses. Supports text messages, file
|
|||
* `message` (string, required): The message to send
|
||||
* `attachments` (array, optional): Array of `{filename, base64}` objects
|
||||
* `lifetime_hours` (number, optional): Chat lifetime in hours (default: 24)
|
||||
* `project` (string, optional): Project name to activate (only on first message)
|
||||
* `project_name` (string, optional): Project name to activate (only on first message)
|
||||
|
||||
**Headers:**
|
||||
* `X-API-KEY` (required)
|
||||
|
|
@ -185,7 +185,7 @@ async function sendMessageWithProject() {
|
|||
},
|
||||
body: JSON.stringify({
|
||||
message: "Analyze the project structure",
|
||||
project: "my-web-app" // Activates this project
|
||||
project_name: "my-web-app" // Activates this project
|
||||
})
|
||||
});
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ async function sendMessageWithProject() {
|
|||
body: JSON.stringify({
|
||||
context_id: data.context_id,
|
||||
message: "What files are in the project?"
|
||||
// Do NOT include project field here - already set on first message
|
||||
// Do NOT include project_name here - already set on first message
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
• <code>message</code> (string, required): The message to send<br>
|
||||
• <code>attachments</code> (array, optional): Array of {filename, base64} objects<br>
|
||||
• <code>lifetime_hours</code> (number, optional): Chat lifetime in hours (default: 24)<br>
|
||||
• <code>project</code> (string, optional): Project name to activate (only on first message)
|
||||
• <code>project_name</code> (string, optional): Project name to activate (only on first message)
|
||||
</p>
|
||||
<p style="margin: 0; color: var(--color-text-secondary); font-size: 14px;">
|
||||
<strong>Headers:</strong> <code>X-API-KEY</code> (required), <code>Content-Type: application/json</code>
|
||||
|
|
@ -629,7 +629,7 @@ async function sendMessageWithProject() {
|
|||
},
|
||||
body: JSON.stringify({
|
||||
message: "Analyze the project structure",
|
||||
project: "my-web-app" // Activates this project
|
||||
project_name: "my-web-app" // Activates this project
|
||||
})
|
||||
});
|
||||
|
||||
|
|
@ -650,7 +650,7 @@ async function sendMessageWithProject() {
|
|||
body: JSON.stringify({
|
||||
context_id: data.context_id,
|
||||
message: "What files are in the project?"
|
||||
// Do NOT include project field here - already set on first message
|
||||
// Do NOT include project_name here - already set on first message
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue