Skip to content

Commit

Permalink
updated convo history response
Browse files Browse the repository at this point in the history
  • Loading branch information
zAlweNy26 committed Nov 4, 2023
1 parent 55b3bff commit 186665a
Show file tree
Hide file tree
Showing 32 changed files with 115 additions and 135 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

1 change: 0 additions & 1 deletion api/CCatAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ export class CCatAPI {
this.status = new StatusService(this.request);
}
}

1 change: 0 additions & 1 deletion api/models/BodyInstallPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
export type BodyInstallPlugin = {
file: Blob;
};

1 change: 0 additions & 1 deletion api/models/BodyUploadFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
export type BodyUploadFile = {
file: Blob;
};

1 change: 0 additions & 1 deletion api/models/BodyUploadMemory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
export type BodyUploadMemory = {
file: Blob;
};

1 change: 0 additions & 1 deletion api/models/BodyUploadUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ export type BodyUploadUrl = {
*/
url: string;
};

1 change: 0 additions & 1 deletion api/models/Collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ export type Collection = {
name: string;
vectors_count: number;
};

1 change: 0 additions & 1 deletion api/models/CollectionData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ export type CollectionData = {
score: number;
vector: Array<number>;
};

1 change: 0 additions & 1 deletion api/models/CollectionsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ import type { Collection } from './Collection';
export type CollectionsList = {
collections: Array<Collection>;
};

2 changes: 1 addition & 1 deletion api/models/ConversationMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
export type ConversationMessage = {
who: string;
message: string;
why?: Record<string, any>;
};

1 change: 0 additions & 1 deletion api/models/DeleteResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
export type DeleteResponse = {
deleted: (string | boolean | Record<string, any> | any[]);
};

1 change: 0 additions & 1 deletion api/models/FileResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ export type FileResponse = {
content_type: string;
info: string;
};

5 changes: 2 additions & 3 deletions api/models/HTTPValidationError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

export type HTTPValidationError = {
detail?: {
error: string;
};
error: string;
};
};

1 change: 0 additions & 1 deletion api/models/MemoryRecall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ export type MemoryRecall = {
query: QueryData;
vectors: VectorsData;
};

1 change: 0 additions & 1 deletion api/models/MetaData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ export type MetaData = {
docstring?: string;
name?: string;
};

11 changes: 5 additions & 6 deletions api/models/Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ export type Plugin = {
active?: boolean;
url?: string;
hooks?: Array<{
name: string;
priority: number;
}>;
name: string;
priority: number;
}>;
tools?: Array<{
name: string;
}>;
name: string;
}>;
};

5 changes: 2 additions & 3 deletions api/models/PluginsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import type { Plugin } from './Plugin';

export type PluginsList = {
filters: {
query?: string;
};
query?: string;
};
installed: Array<Plugin>;
registry: Array<Plugin>;
};

1 change: 0 additions & 1 deletion api/models/QueryData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ export type QueryData = {
text: string;
vector: Array<number>;
};

1 change: 0 additions & 1 deletion api/models/Setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ export type Setting = {
value: Record<string, any>;
schema?: Record<string, any>;
};

1 change: 0 additions & 1 deletion api/models/SettingBody.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ export type SettingBody = {
value: Record<string, any>;
category?: string;
};

1 change: 0 additions & 1 deletion api/models/SettingsResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ export type SettingsResponse = {
settings: Array<Setting>;
selected_configuration?: string;
};

1 change: 0 additions & 1 deletion api/models/Status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ export type Status = {
status: string;
version: string;
};

1 change: 0 additions & 1 deletion api/models/VectorsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ export type VectorsData = {
embedder: string;
collections: Record<string, Array<CollectionData>>;
};

1 change: 0 additions & 1 deletion api/models/WebResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ export type WebResponse = {
url: string;
info: string;
};

18 changes: 9 additions & 9 deletions api/services/EmbedderService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { BaseHttpRequest } from '../core/BaseHttpRequest';

export class EmbedderService {

constructor(private readonly httpRequest: BaseHttpRequest) {}
constructor(public readonly httpRequest: BaseHttpRequest) {}

/**
* Get Embedders Settings
Expand All @@ -28,13 +28,13 @@ export class EmbedderService {
/**
* Get Embedder Settings
* Get settings and schema of the specified Embedder
* @param languageEmbedderName
* @param languageEmbedderName
* @returns Setting Successful Response
* @throws ApiError
*/
public getEmbedderSettings(
languageEmbedderName: string,
): CancelablePromise<Setting> {
languageEmbedderName: string,
): CancelablePromise<Setting> {
return this.httpRequest.request({
method: 'GET',
url: '/embedder/settings/{languageEmbedderName}/',
Expand All @@ -50,15 +50,15 @@ export class EmbedderService {
/**
* Upsert Embedder Setting
* Upsert the Embedder setting
* @param languageEmbedderName
* @param requestBody
* @param languageEmbedderName
* @param requestBody
* @returns Setting Successful Response
* @throws ApiError
*/
public upsertEmbedderSetting(
languageEmbedderName: string,
requestBody: Record<string, any>,
): CancelablePromise<Setting> {
languageEmbedderName: string,
requestBody: Record<string, any>,
): CancelablePromise<Setting> {
return this.httpRequest.request({
method: 'PUT',
url: '/embedder/settings/{languageEmbedderName}/',
Expand Down
18 changes: 9 additions & 9 deletions api/services/LargeLanguageModelService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { BaseHttpRequest } from '../core/BaseHttpRequest';

export class LargeLanguageModelService {

constructor(private readonly httpRequest: BaseHttpRequest) {}
constructor(public readonly httpRequest: BaseHttpRequest) {}

/**
* Get LLMs Settings
Expand All @@ -28,13 +28,13 @@ export class LargeLanguageModelService {
/**
* Get Llm Settings
* Get settings and schema of the specified Large Language Model
* @param languageModelName
* @param languageModelName
* @returns Setting Successful Response
* @throws ApiError
*/
public getLlmSettings(
languageModelName: string,
): CancelablePromise<Setting> {
languageModelName: string,
): CancelablePromise<Setting> {
return this.httpRequest.request({
method: 'GET',
url: '/llm/settings/{languageModelName}/',
Expand All @@ -50,15 +50,15 @@ export class LargeLanguageModelService {
/**
* Upsert LLM Setting
* Upsert the Large Language Model setting
* @param languageModelName
* @param requestBody
* @param languageModelName
* @param requestBody
* @returns Setting Successful Response
* @throws ApiError
*/
public upsertLlmSetting(
languageModelName: string,
requestBody: Record<string, any>,
): CancelablePromise<Setting> {
languageModelName: string,
requestBody: Record<string, any>,
): CancelablePromise<Setting> {
return this.httpRequest.request({
method: 'PUT',
url: '/llm/settings/{languageModelName}/',
Expand Down
40 changes: 20 additions & 20 deletions api/services/MemoryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { BaseHttpRequest } from '../core/BaseHttpRequest';

export class MemoryService {

constructor(private readonly httpRequest: BaseHttpRequest) {}
constructor(public readonly httpRequest: BaseHttpRequest) {}

/**
* Recall Memories From Text
Expand All @@ -24,10 +24,10 @@ export class MemoryService {
* @throws ApiError
*/
public recallMemoriesFromText(
text: string,
k: number = 100,
userId: string = 'user',
): CancelablePromise<MemoryRecall> {
text: string,
k: number = 100,
userId: string = 'user',
): CancelablePromise<MemoryRecall> {
return this.httpRequest.request({
method: 'GET',
url: '/memory/recall/',
Expand Down Expand Up @@ -71,13 +71,13 @@ export class MemoryService {
/**
* Wipe Single Collection
* Delete and recreate a collection
* @param collectionId
* @param collectionId
* @returns DeleteResponse Successful Response
* @throws ApiError
*/
public wipeSingleCollection(
collectionId: string,
): CancelablePromise<DeleteResponse> {
collectionId: string,
): CancelablePromise<DeleteResponse> {
return this.httpRequest.request({
method: 'DELETE',
url: '/memory/collections/{collection_id}/',
Expand All @@ -93,15 +93,15 @@ export class MemoryService {
/**
* Delete Point In Memory
* Delete specific point in memory
* @param collectionId
* @param memoryId
* @param collectionId
* @param memoryId
* @returns DeleteResponse Successful Response
* @throws ApiError
*/
public deletePointInMemory(
collectionId: string,
memoryId: string,
): CancelablePromise<DeleteResponse> {
collectionId: string,
memoryId: string,
): CancelablePromise<DeleteResponse> {
return this.httpRequest.request({
method: 'DELETE',
url: '/memory/collections/{collection_id}/points/{memory_id}/',
Expand All @@ -118,15 +118,15 @@ export class MemoryService {
/**
* Wipe Memory Points By Metadata
* Delete points in memory by filter
* @param collectionId
* @param requestBody
* @param collectionId
* @param requestBody
* @returns DeleteResponse Successful Response
* @throws ApiError
*/
public wipeMemoryPoints(
collectionId: string,
requestBody?: Record<string, any>,
): CancelablePromise<DeleteResponse> {
collectionId: string,
requestBody?: Record<string, any>,
): CancelablePromise<DeleteResponse> {
return this.httpRequest.request({
method: 'DELETE',
url: '/memory/collections/{collection_id}/points/',
Expand All @@ -148,8 +148,8 @@ export class MemoryService {
* @throws ApiError
*/
public getConversationHistory(): CancelablePromise<{
history: Array<ConversationMessage>;
}> {
history: Array<ConversationMessage>;
}> {
return this.httpRequest.request({
method: 'GET',
url: '/memory/conversation_history/',
Expand Down
Loading

0 comments on commit 186665a

Please sign in to comment.