(core) Porting back AI formula backend

Summary: This is a backend part for the formula AI.

Test Plan: New tests

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: cyprien

Differential Revision: https://phab.getgrist.com/D3786
This commit is contained in:
Jarosław Sadziński
2023-02-08 16:46:34 +01:00
parent ef0a55ced1
commit 6e3f0f2b35
10 changed files with 595 additions and 0 deletions

View File

@@ -318,6 +318,11 @@ export interface ActiveDocAPI {
*/
getFormulaError(tableId: string, colId: string, rowId: number): Promise<CellValue>;
/**
* Generates a formula code based on the AI suggestions, it also modifies the column and sets it type to a formula.
*/
getAssistance(tableId: string, colId: string, description: string): Promise<void>;
/**
* Fetch content at a url.
*/

View File

@@ -0,0 +1,11 @@
import {DocAction} from 'app/common/DocActions';
export interface Prompt {
tableId: string;
colId: string
description: string;
}
export interface Suggestion {
suggestedActions: DocAction[];
}