Skip to main content

PlanningPromptCompleted Interface

An EventFlowDebugEvent marking the completion of the flow for prompting an LLM to generate a plan for accomplishing the user's goal. There will be exactly 1 of these events per ai-collab function execution.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/ai-collab/alpha.

For more information about our API support guarantees, see here.

Signature

export interface PlanningPromptCompleted<TIsLlmResponseValid = boolean, TPlan = TIsLlmResponseValid extends true ? string : undefined> extends EventFlowDebugEvent

Extends: EventFlowDebugEvent

Type Parameters

Parameter Default Description
TIsLlmResponseValid boolean
TPlan TIsLlmResponseValid extends true ? string : undefined

Properties

Property Alerts Type Description
eventFlowName Alpha typeof EventFlowDebugNames.GENERATE_PLANNING_PROMPT
eventFlowStatus Alpha "COMPLETED"
eventName Alpha "GENERATE_PLANNING_PROMPT_COMPLETED"
isLlmResponseValid Alpha TIsLlmResponseValid

Whether the response produced by the LLM is an expected response. In the event that the LLM fails to respond in an expected way, despite the API call to the LLM itself being successful, then this fields value will be false.

For now, this case is limited to the LLM returning undefined as a response when it should have returned something. But in the future this could expand to things such as invalid json.

llmGeneratedPlan Alpha TPlan The plan generated by the LLM. If the wasLlmResponseValid field is false then this will be undefined, otherwise it will be a string.

Property Details

eventFlowName

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

eventFlowName: typeof EventFlowDebugNames.GENERATE_PLANNING_PROMPT;

Type: typeof EventFlowDebugNames.GENERATE_PLANNING_PROMPT

eventFlowStatus

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

eventFlowStatus: "COMPLETED";

Type: "COMPLETED"

eventName

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

eventName: "GENERATE_PLANNING_PROMPT_COMPLETED";

Type: "GENERATE_PLANNING_PROMPT_COMPLETED"

isLlmResponseValid

Whether the response produced by the LLM is an expected response. In the event that the LLM fails to respond in an expected way, despite the API call to the LLM itself being successful, then this fields value will be false.

For now, this case is limited to the LLM returning undefined as a response when it should have returned something. But in the future this could expand to things such as invalid json.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

isLlmResponseValid: TIsLlmResponseValid;

Type: TIsLlmResponseValid

llmGeneratedPlan

The plan generated by the LLM. If the wasLlmResponseValid field is false then this will be undefined, otherwise it will be a string.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

llmGeneratedPlan: TPlan;

Type: TPlan