Skip to content

Commit

Permalink
feat(specs): add transformation copilot to ingestion (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3479

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
  • Loading branch information
algolia-bot and Fluf22 committed Aug 6, 2024
1 parent 9c8f4b7 commit 1dfc4e9
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/ingestion/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export * from './mappingInput';
export * from './mappingKitAction';
export * from './mappingTypeCSV';
export * from './methodType';
export * from './model';
export * from './onDemandTrigger';
export * from './onDemandTriggerInput';
export * from './onDemandTriggerType';
Expand Down Expand Up @@ -134,6 +135,7 @@ export * from './transformation';
export * from './transformationCreate';
export * from './transformationCreateResponse';
export * from './transformationError';
export * from './transformationModels';
export * from './transformationSearch';
export * from './transformationTry';
export * from './transformationTryResponse';
Expand Down
13 changes: 13 additions & 0 deletions packages/ingestion/model/model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

export type Model = {
fullname: string;

modelName: string;

systemPrompt: string;

id: string;

provider: string;
};
10 changes: 10 additions & 0 deletions packages/ingestion/model/transformationModels.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

import type { Model } from './model';

/**
* List of available AI models for transformation purposes.
*/
export type TransformationModels = {
llms: Model[];
};
28 changes: 28 additions & 0 deletions packages/ingestion/src/ingestionClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ import type { TaskV1 } from '../model/taskV1';
import type { Transformation } from '../model/transformation';
import type { TransformationCreate } from '../model/transformationCreate';
import type { TransformationCreateResponse } from '../model/transformationCreateResponse';
import type { TransformationModels } from '../model/transformationModels';
import type { TransformationSearch } from '../model/transformationSearch';
import type { TransformationTry } from '../model/transformationTry';
import type { TransformationTryResponse } from '../model/transformationTryResponse';
Expand Down Expand Up @@ -1871,6 +1872,33 @@ export function createIngestionClient({
return transporter.request(request, requestOptions);
},

/**
* Retrieves a list of existing LLM transformation helpers.
*
* Required API Key ACLs:
* - addObject
* - deleteIndex
* - editSettings.
*
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
listTransformationModels(
requestOptions?: RequestOptions
): Promise<TransformationModels> {
const requestPath = '/1/transformations/copilot';
const headers: Headers = {};
const queryParameters: QueryParameters = {};

const request: Request = {
method: 'GET',
path: requestPath,
queryParameters,
headers,
};

return transporter.request(request, requestOptions);
},

/**
* Retrieves a list of transformations.
*
Expand Down

0 comments on commit 1dfc4e9

Please sign in to comment.