SemanticAgentOptions Interface
Options used to parameterize the creation of a SharedTreeSemanticAgent.
To use, import via @fluidframework/tree-agent/alpha.
For more information about our API support guarantees, see here.
Signature
export interface SemanticAgentOptions<TSchema extends ImplicitFieldSchema>
Type Parameters
| Parameter | Constraint | Description |
|---|---|---|
| TSchema | ImplicitFieldSchema |
Properties
| Property | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| domainHints | Alpha | optional | string | Additional information about the application domain that will be included in the context provided to the model. |
| editor | Alpha | optional | SynchronousEditor<TSchema> | AsynchronousEditor<TSchema> | Executes any generated JavaScript created by the model's editing tool. |
| logger | Alpha | optional | Logger | If supplied, generates human-readable markdown text describing the actions taken by the agent as it performs queries. |
| maximumSequentialEdits | Alpha | optional | number | The maximum number of sequential edits the LLM can make before we assume it's stuck in a loop. |
Property Details
domainHints
Additional information about the application domain that will be included in the context provided to the model.
For more information about our API support guarantees, see here.
Signature
domainHints?: string;
Type: string
editor
Executes any generated JavaScript created by the model's editing tool.
For more information about our API support guarantees, see here.
Signature
editor?: SynchronousEditor<TSchema> | AsynchronousEditor<TSchema>;
Type: SynchronousEditor<TSchema> | AsynchronousEditor<TSchema>
Remarks
If this function is not provided, the generated code will be executed using a simple JavaScript eval which may not provide sufficient security guarantees for some environments. Run the code in a sandboxed environment or use a library such as SES to provide a more secure implementation - see @fluidframework/tree-agent-ses for a drop-in implementation.
logger
If supplied, generates human-readable markdown text describing the actions taken by the agent as it performs queries.
For more information about our API support guarantees, see here.
Signature
logger?: Logger;
Type: Logger
maximumSequentialEdits
The maximum number of sequential edits the LLM can make before we assume it's stuck in a loop.
For more information about our API support guarantees, see here.
Signature
maximumSequentialEdits?: number;
Type: number