u
This commit is contained in:
@@ -45,12 +45,12 @@ Exports: `LLMOrbiter`, `OpenRouterProvider`, `defineTool`, `ToolError`, `DirectR
|
||||
|
||||
### `orbiter.run(opts)`
|
||||
|
||||
`{ prompt, messages, model, tools, maxIterations=10, extraBody, signal }`.
|
||||
`{ prompt, messages, model, tools, maxIterations=100, extraBody, signal }`.
|
||||
|
||||
- `prompt`: user message string to append (omit or pass `null` to continue without adding one).
|
||||
- `messages`: transcript array to seed from; a leading `{ role: 'system' }` is the system prompt.
|
||||
- `tools`: array of tool objects created with `defineTool()`.
|
||||
- `maxIterations`: safety limit on tool-calling loop iterations (default: `10`).
|
||||
- `maxIterations`: safety limit on tool-calling loop iterations (default: `100`).
|
||||
- `extraBody`: extra parameters merged into provider request payload.
|
||||
- `signal`: external `AbortSignal`.
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class LLMOrbiter {
|
||||
* prompt. Omit to start a fresh conversation.
|
||||
* @param {string} [opts.model] — model identifier (provider-specific default if omitted)
|
||||
* @param {Array} [opts.tools] — array of Tool objects from defineTool()
|
||||
* @param {number} [opts.maxIterations=10] — safety limit for tool-call loops
|
||||
* @param {number} [opts.maxIterations=100] — safety limit for tool-call loops
|
||||
* @param {Object} [opts.extraBody] — extra fields merged into the request body (e.g. reasoning)
|
||||
* @param {AbortSignal} [opts.signal] — optional external abort signal
|
||||
* @returns {Promise<RunResult>}
|
||||
@@ -81,7 +81,7 @@ class LLMOrbiter {
|
||||
messages: seedMessages,
|
||||
model,
|
||||
tools = [],
|
||||
maxIterations = 10,
|
||||
maxIterations = 100,
|
||||
extraBody = {},
|
||||
signal,
|
||||
} = opts;
|
||||
|
||||
Reference in New Issue
Block a user