(org: { id: number })
| 48 | export const dataAnalysisActionName = "perform_data_analysis"; |
| 49 | |
| 50 | export function dataAnalysisAction(org: { id: number }): ActionPlusApiInfo { |
| 51 | return { |
| 52 | action_type: "function", |
| 53 | active: true, |
| 54 | description: |
| 55 | "This passes responses to API calls you are making to another AI who " + |
| 56 | "writes code to perform data analysis (visualize data or make calculations) for the user. " + |
| 57 | "You may only call this ONCE in a list of Commands. Call it in the same list of Commands " + |
| 58 | "as the API calls you want it to perform data analysis on. THIS IS VERY IMPORTANT. DO NOT FORGET THIS", |
| 59 | name: dataAnalysisActionName, |
| 60 | org_id: org.id, |
| 61 | parameters: [ |
| 62 | { |
| 63 | in: "query", |
| 64 | name: "instruction", |
| 65 | description: |
| 66 | "The instruction to give to the Data Analysis AI. E.g. 'Plot a bar chart of the conversion rate for each channel over the past 2 weeks'. Be as detailed as possible.", |
| 67 | required: true, |
| 68 | schema: { |
| 69 | type: "string", |
| 70 | }, |
| 71 | }, |
| 72 | ] as Json, |
| 73 | path: "", |
| 74 | requires_confirmation: false, |
| 75 | request_method: "get", |
| 76 | api: { |
| 77 | auth_header: `x-api-key`, |
| 78 | auth_query_param_name: "", |
| 79 | auth_scheme: null, |
| 80 | org_id: org.id, |
| 81 | }, |
| 82 | headers: [{}], |
| 83 | } as ActionPlusApiInfo; |
| 84 | } |
nothing calls this directly
no outgoing calls
no test coverage detected