SharedTreeChatQuery Interface
A query from a user to a SharedTreeSemanticAgent.
To use, import via @fluidframework/tree-agent/alpha.
For more information about our API support guarantees, see here.
Signature
export interface SharedTreeChatQuery
Remarks
Processing a query may involve editing the SharedTree via the provided edit(js) function.
Properties
| Property | Alerts | Type | Description |
|---|---|---|---|
| text | Alpha | string | The user's query. |
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| edit(js) | Alpha | Promise<EditResult> | Edit the tree with the provided JavaScript function code. |
Property Details
text
The user's query.
For more information about our API support guarantees, see here.
Signature
text: string;
Type: string
Method Details
edit
Edit the tree with the provided JavaScript function code.
For more information about our API support guarantees, see here.
Signature
edit(js: string): Promise<EditResult>;
Remarks
Attempting an edit may fail for a variety of reasons which are captured in the returned object. If an edit fails, the tree will not be modified and the model may attempt another edit if desired. When the query ends, if the last edit attempt was successful, all edits made during the query will be merged into the agent's SharedTree. Otherwise, all edits made during the query will be discarded.
Parameters
| Parameter | Type | Description |
|---|---|---|
| js | string |
Returns
Return type: Promise<EditResult>