Refine return type of getActionInstruction function

- Updated the return type of getActionInstruction function from 'any' to a specific object structure.
- The new return type includes 'name', 'description', and 'parameters' fields.
This commit is contained in:
bobo.yang 2023-07-24 08:12:05 +08:00
parent 69373a4e5c
commit a5fa247c0f

View File

@ -16,7 +16,7 @@ export interface Action {
}
// generate instruction for action
export function getActionInstruction(action: Action): any {
export function getActionInstruction(action: Action): { name: string, description: string, parameters: any } {
logger.channel()?.info(`Action Name: ${action.name}`);
const actionSchema = {
name: action.name,