diff --git a/my-index.ejs b/my-index.ejs index 7439a385201..5c7854a3262 100644 --- a/my-index.ejs +++ b/my-index.ejs @@ -50,7 +50,8 @@ - + +
diff --git a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts index bf4da4d89a4..e016c1aab49 100644 --- a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts +++ b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts @@ -133,6 +133,9 @@ export type ClinicalAttributeCountFilter = { 'sampleListId': string }; +export type UserMessage = { + 'message': string +}; export type ClinicalData = { 'clinicalAttribute': ClinicalAttribute @@ -8480,4 +8483,55 @@ export default class CBioPortalAPIInternal { return response.body; }); }; + + /** + * Send a support message to the AI support endpoint. + * @method + * @name CBioPortalAPIInternal#getSupportUsingPOST + * @param {Object} parameters - Parameters for the request. + * @param {UserMessage} [parameters.userMessage] - The message to send to the AI support system. This can contain user queries, questions, or other requests. + * @param {string} [parameters.$domain] - Optional override for the API domain. Defaults to the instance's domain if not provided. + */ + getSupportUsingPOSTWithHttpInfo(parameters: { + 'userMessage' ? : UserMessage, + $domain ? : string + }): Promise < request.Response > { + const domain = parameters.$domain ? parameters.$domain : this.domain; + const errorHandlers = this.errorHandlers; + const request = this.request; + let path = '/api/assistant'; + let body: any; + let queryParameters: any = {}; + let headers: any = {}; + let form: any = {}; + return new Promise(function(resolve, reject) { + headers['Accept'] = 'application/json'; + headers['Content-Type'] = 'application/json'; + + if (parameters['userMessage'] !== undefined) { + body = parameters['userMessage']; + } + + request('POST', domain + path, body, headers, queryParameters, form, reject, resolve, errorHandlers); + + }); + }; + + /** + * Send a support message to the AI support endpoint and return only the response body. + * @method + * @name CBioPortalAPIInternal#getSupprtUsingPOST + * @param {Object} parameters - Parameters for the request. + * @param {UserMessage} [parameters.userMessage] - The message to send to the AI support system. + * @param {string} [parameters.$domain] - Optional override for the API domain. + */ + getSupportUsingPOST(parameters: { + 'userMessage' ? : UserMessage, + $domain ? : string + }): Promise<{ aiResponse: string }> + { + return this.getSupportUsingPOSTWithHttpInfo(parameters).then(function(response: request.Response) { + return response.body; + }); + }; } diff --git a/packages/cbioportal-ts-api-client/src/index.tsx b/packages/cbioportal-ts-api-client/src/index.tsx index af3719a4e23..b67d575976e 100644 --- a/packages/cbioportal-ts-api-client/src/index.tsx +++ b/packages/cbioportal-ts-api-client/src/index.tsx @@ -82,6 +82,7 @@ export { CustomDriverAnnotationReport, StructuralVariant, StructuralVariantFilter, + UserMessage, StructuralVariantQuery, StructuralVariantGeneSubQuery, StructuralVariantFilterQuery, diff --git a/src/appShell/App/PortalFooter.tsx b/src/appShell/App/PortalFooter.tsx index 69cbe3d61df..4f5df1c85f4 100644 --- a/src/appShell/App/PortalFooter.tsx +++ b/src/appShell/App/PortalFooter.tsx @@ -187,9 +187,9 @@ export default class PortalFooter extends React.Component<
+