* Registers a new function to be used in the chat completion. * @remarks * This is used to add new capabilities to Codepilot's chat feature * @param name The name of the function. * @param schema The schema of the function. * @param fn The function to be executed.
(schema, fn)
| 65 | * @param fn The function to be executed. |
| 66 | */ |
| 67 | addFunction(schema, fn) { |
| 68 | this._functions.set(schema.name, { schema, fn }); |
| 69 | return this; |
| 70 | } |
| 71 | /** |
| 72 | * Starts the chat session and listens for user input. |
| 73 | */ |