@vendasta/ai-assistants 0.36.0 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ export declare enum GenerateChatAnswerRequestModel {
2
+ MODEL_NOT_SET = 0,
3
+ MODEL_OPENAI_GPT_4OMNI = 1,
4
+ MODEL_OPENAI_GPT_4OMNI_MINI = 2,
5
+ MODEL_OPENAI_GPT_4DOT1 = 3,
6
+ MODEL_OPENAI_GPT_4DOT1_MINI = 4,
7
+ MODEL_OPENAI_GPT_4DOT1_NANO = 5,
8
+ MODEL_GOOGLE_GEMINI_2DOT5_PRO_PREVIEW = 6,
9
+ MODEL_GOOGLE_GEMINI_2DOT5_FLASH_PREVIEW = 7
10
+ }
@@ -2,3 +2,5 @@ export { FunctionParameterParameterLocation, } from './function.enum';
2
2
  export { GoalChannel, GoalType, } from './goal.enum';
3
3
  export { AssistantType, VendorModel, } from './assistant.enum';
4
4
  export { ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessageRole, } from './answer.enum';
5
+ export { SortDirection, } from './integration-tests.enum';
6
+ export { GenerateChatAnswerRequestModel, } from './api.enum';
@@ -0,0 +1,5 @@
1
+ export declare enum SortDirection {
2
+ SORT_DIRECTION_INVALID = 0,
3
+ SORT_DIRECTION_ASCENDING = 1,
4
+ SORT_DIRECTION_DESCENDING = 2
5
+ }
@@ -1,5 +1,5 @@
1
- import { DeleteTestCasesRequest, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, RunTestsRequest, RunTestsResponse, UpsertTestCasesRequest } from './objects/';
2
- import { DeleteTestCasesRequestInterface, ListTestCasesByAssistantRequestInterface, RunTestsRequestInterface, UpsertTestCasesRequestInterface } from './interfaces/';
1
+ import { CancelTestRunRequest, DeleteTestCasesRequest, GetTestRunRequest, GetTestRunResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, RunTestsRequest, RunTestsResponse, UpsertTestCasesRequest } from './objects/';
2
+ import { CancelTestRunRequestInterface, DeleteTestCasesRequestInterface, GetTestRunRequestInterface, ListTestCasesByAssistantRequestInterface, ListTestRunsByAssistantRequestInterface, RunTestsRequestInterface, UpsertTestCasesRequestInterface } from './interfaces/';
3
3
  import { HttpResponse } from '@angular/common/http';
4
4
  import { Observable } from 'rxjs';
5
5
  import * as i0 from "@angular/core";
@@ -12,6 +12,9 @@ export declare class IntegrationTestApiService {
12
12
  upsertTestCases(r: UpsertTestCasesRequest | UpsertTestCasesRequestInterface): Observable<HttpResponse<null>>;
13
13
  deleteTestCases(r: DeleteTestCasesRequest | DeleteTestCasesRequestInterface): Observable<HttpResponse<null>>;
14
14
  runTests(r: RunTestsRequest | RunTestsRequestInterface): Observable<RunTestsResponse>;
15
+ listTestRunsByAssistant(r: ListTestRunsByAssistantRequest | ListTestRunsByAssistantRequestInterface): Observable<ListTestRunsByAssistantResponse>;
16
+ getTestRun(r: GetTestRunRequest | GetTestRunRequestInterface): Observable<GetTestRunResponse>;
17
+ cancelTestRun(r: CancelTestRunRequest | CancelTestRunRequestInterface): Observable<HttpResponse<null>>;
15
18
  static ɵfac: i0.ɵɵFactoryDeclaration<IntegrationTestApiService, never>;
16
19
  static ɵprov: i0.ɵɵInjectableDeclaration<IntegrationTestApiService>;
17
20
  }
@@ -339,6 +339,7 @@ export interface GenerateChatAnswerRequestOptionsInterface {
339
339
  includeAllCitations?: boolean;
340
340
  enableAsyncFunctions?: boolean;
341
341
  maxTokens?: number;
342
+ model?: e.GenerateChatAnswerRequestModel;
342
343
  }
343
344
  export interface UpsertAssistantRequestOptionsInterface {
344
345
  applyDefaults?: boolean;
@@ -7,7 +7,7 @@ export { AssistantInterface, AssistantKeyInterface, ConfigInterface, Configurabl
7
7
  export { ConnectionInterface, ConnectionKeyInterface, } from './connection.interface';
8
8
  export { ChatAnswerFunctionExecutionJobInterface, ChatAnswerFunctionExecutionJobResultInterface, ChatMessageInterface, ChatUserInfoInterface, ContextInfoInterface, } from './answer.interface';
9
9
  export { PagedRequestOptionsInterface, PagedResponseMetadataInterface, } from './paging.interface';
10
- export { DeleteTestCasesRequestInterface, ListTestCasesByAssistantRequestInterface, ListTestCasesByAssistantResponseInterface, RunTestsRequestInterface, RunTestsResponseInterface, TestCaseInterface, UpsertTestCasesRequestInterface, } from './integration-tests.interface';
10
+ export { CancelTestRunRequestInterface, DeleteTestCasesRequestInterface, GetTestRunRequestInterface, GetTestRunResponseInterface, ListTestCasesByAssistantRequestInterface, ListTestCasesByAssistantResponseInterface, ListTestRunsByAssistantRequestInterface, ListTestRunsByAssistantResponseInterface, RunTestsRequestInterface, RunTestsResponseInterface, SortOptionsInterface, TestCaseInterface, TestResultInterface, TestRunInterface, UpsertTestCasesRequestInterface, } from './integration-tests.interface';
11
11
  export { AccessInterface, } from './annotations.interface';
12
12
  export { FieldMaskInterface, } from './field-mask.interface';
13
13
  export { BuildDefaultAssistantRequestInterface, BuildDefaultAssistantResponseInterface, SetAssistantConnectionsRequestConnectionStateInterface, CreateAssistantRequestInterface, CreateAssistantResponseInterface, CreateGoalRequestInterface, CreateGoalResponseInterface, CreatePromptModuleRequestInterface, CreatePromptModuleResponseInterface, CreatePromptModuleVersionRequestInterface, CreatePromptRequestInterface, DeleteAssistantRequestInterface, DeleteConnectionRequestInterface, DeleteFunctionRequestInterface, DeleteGoalRequestInterface, DeletePromptModuleRequestInterface, DeletePromptRequestInterface, DeployPromptModuleRequestInterface, DeployPromptRequestInterface, ExecuteFunctionRequestInterface, ExecuteFunctionResponseInterface, ListFunctionRequestFiltersInterface, ListConnectionsRequestFiltersInterface, ListPromptModuleRequestFiltersInterface, ListAllAssistantsAssociatedToConnectionRequestFiltersInterface, ListAssistantRequestFiltersInterface, ListGoalsRequestFiltersInterface, GenerateChatAnswerRequestInterface, GenerateChatAnswerResponseInterface, GetAssistantRequestInterface, GetAssistantResponseInterface, GetChatAnswerFunctionExecutionJobRequestInterface, GetChatAnswerFunctionExecutionJobResponseInterface, GetConnectionRequestInterface, GetConnectionResponseInterface, GetDeployedPromptModuleVersionRequestInterface, GetDeployedPromptModuleVersionResponseInterface, GetDeployedPromptVersionRequestInterface, GetDeployedPromptVersionResponseInterface, GetFunctionRequestInterface, GetFunctionResponseInterface, GetGoalRequestInterface, GetGoalResponseInterface, GetHydratedDeployedPromptModuleVersionRequestInterface, GetHydratedDeployedPromptModuleVersionResponseInterface, GetMultiDeployedPromptVersionRequestInterface, GetMultiDeployedPromptVersionResponseInterface, GetMultiFunctionRequestInterface, GetMultiFunctionResponseInterface, GetMultiGoalRequestInterface, GetMultiGoalResponseInterface, GetMultiHydratedDeployedPromptModuleVersionRequestInterface, GetMultiHydratedDeployedPromptModuleVersionResponseInterface, GetPromptModuleRequestInterface, GetPromptModuleResponseInterface, GetPromptModuleVersionRequestInterface, GetPromptModuleVersionResponseInterface, GetPromptRequestInterface, GetPromptResponseInterface, GetPromptVersionRequestInterface, GetPromptVersionResponseInterface, GoalsDisabledForAccountGroupRequestInterface, GoalsDisabledForAccountGroupResponseInterface, ListAllAssistantsAssociatedToConnectionRequestInterface, ListAllAssistantsAssociatedToConnectionResponseInterface, ListAssistantRequestInterface, ListAssistantResponseInterface, ListConnectionsRequestInterface, ListConnectionsResponseInterface, ListFunctionRequestInterface, ListFunctionResponseInterface, ListGoalsRequestInterface, ListGoalsResponseInterface, ListPromptModuleRequestInterface, ListPromptModuleResponseInterface, ListPromptModuleVersionsRequestInterface, ListPromptModuleVersionsResponseInterface, ListPromptRequestInterface, ListPromptResponseInterface, ListPromptVersionsRequestInterface, ListPromptVersionsResponseInterface, CreateAssistantRequestOptionsInterface, CreatePromptModuleVersionRequestOptionsInterface, GenerateChatAnswerRequestOptionsInterface, UpsertAssistantRequestOptionsInterface, SetAssistantConnectionsRequestInterface, UpdateAssistantRequestInterface, UpdateGoalRequestInterface, UpdatePromptModuleRequestInterface, UpdatePromptRequestInterface, UpsertAssistantRequestInterface, UpsertAssistantResponseInterface, UpsertConnectionRequestInterface, UpsertFunctionRequestInterface, UpsertGoalRequestInterface, } from './api.interface';
@@ -1,18 +1,40 @@
1
1
  import { AssistantKeyInterface } from './assistant.interface';
2
2
  import { ChatMessageInterface } from './answer.interface';
3
3
  import { PagedRequestOptionsInterface, PagedResponseMetadataInterface } from './paging.interface';
4
+ import * as e from '../enums';
5
+ export interface CancelTestRunRequestInterface {
6
+ assistant?: AssistantKeyInterface;
7
+ id?: string;
8
+ }
4
9
  export interface DeleteTestCasesRequestInterface {
5
10
  assistant?: AssistantKeyInterface;
6
11
  testCaseIds?: string[];
7
12
  }
13
+ export interface GetTestRunRequestInterface {
14
+ assistant?: AssistantKeyInterface;
15
+ id?: string;
16
+ }
17
+ export interface GetTestRunResponseInterface {
18
+ testRun?: TestRunInterface;
19
+ }
8
20
  export interface ListTestCasesByAssistantRequestInterface {
9
21
  assistant?: AssistantKeyInterface;
10
22
  pagingOptions?: PagedRequestOptionsInterface;
23
+ searchTerm?: string;
24
+ sortOptions?: SortOptionsInterface;
11
25
  }
12
26
  export interface ListTestCasesByAssistantResponseInterface {
13
27
  testCases?: TestCaseInterface[];
14
28
  pagingMetadata?: PagedResponseMetadataInterface;
15
29
  }
30
+ export interface ListTestRunsByAssistantRequestInterface {
31
+ assistant?: AssistantKeyInterface;
32
+ pagingOptions?: PagedRequestOptionsInterface;
33
+ }
34
+ export interface ListTestRunsByAssistantResponseInterface {
35
+ testRuns?: TestRunInterface[];
36
+ pagingMetadata?: PagedResponseMetadataInterface;
37
+ }
16
38
  export interface RunTestsRequestInterface {
17
39
  assistant?: AssistantKeyInterface;
18
40
  testCaseIds?: string[];
@@ -20,12 +42,32 @@ export interface RunTestsRequestInterface {
20
42
  export interface RunTestsResponseInterface {
21
43
  buildUrl?: string;
22
44
  }
45
+ export interface SortOptionsInterface {
46
+ direction?: e.SortDirection;
47
+ field?: string;
48
+ }
23
49
  export interface TestCaseInterface {
24
50
  id?: string;
25
51
  name?: string;
26
52
  chatHistory?: ChatMessageInterface[];
27
53
  expectation?: string;
28
54
  }
55
+ export interface TestResultInterface {
56
+ id?: string;
57
+ name?: string;
58
+ chatHistory?: ChatMessageInterface[];
59
+ expected?: string;
60
+ evaluation?: string;
61
+ status?: string;
62
+ score?: number;
63
+ }
64
+ export interface TestRunInterface {
65
+ id?: string;
66
+ status?: string;
67
+ testFramework?: string;
68
+ testResults?: TestResultInterface[];
69
+ created?: Date;
70
+ }
29
71
  export interface UpsertTestCasesRequestInterface {
30
72
  assistant?: AssistantKeyInterface;
31
73
  testCases?: TestCaseInterface[];
@@ -578,6 +578,7 @@ export declare class GenerateChatAnswerRequestOptions implements i.GenerateChatA
578
578
  includeAllCitations: boolean;
579
579
  enableAsyncFunctions: boolean;
580
580
  maxTokens: number;
581
+ model: e.GenerateChatAnswerRequestModel;
581
582
  static fromProto(proto: any): GenerateChatAnswerRequestOptions;
582
583
  constructor(kwargs?: i.GenerateChatAnswerRequestOptionsInterface);
583
584
  toApiJson(): object;
@@ -7,7 +7,7 @@ export { Assistant, AssistantKey, Config, ConfigurableGoal, DeepgramConfig, Conf
7
7
  export { Connection, ConnectionKey, } from './connection';
8
8
  export { ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatMessage, ChatUserInfo, ContextInfo, } from './answer';
9
9
  export { PagedRequestOptions, PagedResponseMetadata, } from './paging';
10
- export { DeleteTestCasesRequest, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, RunTestsRequest, RunTestsResponse, TestCase, UpsertTestCasesRequest, } from './integration-tests';
10
+ export { CancelTestRunRequest, DeleteTestCasesRequest, GetTestRunRequest, GetTestRunResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, RunTestsRequest, RunTestsResponse, SortOptions, TestCase, TestResult, TestRun, UpsertTestCasesRequest, } from './integration-tests';
11
11
  export { Access, } from './annotations';
12
12
  export { FieldMask, } from './field-mask';
13
13
  export { BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, SetAssistantConnectionsRequestConnectionState, CreateAssistantRequest, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptRequest, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, ListPromptModuleRequestFilters, ListConnectionsRequestFilters, ListGoalsRequestFilters, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAssistantRequestFilters, ListFunctionRequestFilters, GenerateChatAnswerRequest, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantResponse, ListConnectionsRequest, ListConnectionsResponse, ListFunctionRequest, ListFunctionResponse, ListGoalsRequest, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, CreatePromptModuleVersionRequestOptions, GenerateChatAnswerRequestOptions, CreateAssistantRequestOptions, UpsertAssistantRequestOptions, SetAssistantConnectionsRequest, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, } from './api';
@@ -2,7 +2,15 @@ import * as i from '../interfaces';
2
2
  import { AssistantKey } from './assistant';
3
3
  import { ChatMessage } from './answer';
4
4
  import { PagedRequestOptions, PagedResponseMetadata } from './paging';
5
+ import * as e from '../enums';
5
6
  export declare function enumStringToValue<E>(enumRef: any, value: string): E;
7
+ export declare class CancelTestRunRequest implements i.CancelTestRunRequestInterface {
8
+ assistant: AssistantKey;
9
+ id: string;
10
+ static fromProto(proto: any): CancelTestRunRequest;
11
+ constructor(kwargs?: i.CancelTestRunRequestInterface);
12
+ toApiJson(): object;
13
+ }
6
14
  export declare class DeleteTestCasesRequest implements i.DeleteTestCasesRequestInterface {
7
15
  assistant: AssistantKey;
8
16
  testCaseIds: string[];
@@ -10,9 +18,24 @@ export declare class DeleteTestCasesRequest implements i.DeleteTestCasesRequestI
10
18
  constructor(kwargs?: i.DeleteTestCasesRequestInterface);
11
19
  toApiJson(): object;
12
20
  }
21
+ export declare class GetTestRunRequest implements i.GetTestRunRequestInterface {
22
+ assistant: AssistantKey;
23
+ id: string;
24
+ static fromProto(proto: any): GetTestRunRequest;
25
+ constructor(kwargs?: i.GetTestRunRequestInterface);
26
+ toApiJson(): object;
27
+ }
28
+ export declare class GetTestRunResponse implements i.GetTestRunResponseInterface {
29
+ testRun: TestRun;
30
+ static fromProto(proto: any): GetTestRunResponse;
31
+ constructor(kwargs?: i.GetTestRunResponseInterface);
32
+ toApiJson(): object;
33
+ }
13
34
  export declare class ListTestCasesByAssistantRequest implements i.ListTestCasesByAssistantRequestInterface {
14
35
  assistant: AssistantKey;
15
36
  pagingOptions: PagedRequestOptions;
37
+ searchTerm: string;
38
+ sortOptions: SortOptions;
16
39
  static fromProto(proto: any): ListTestCasesByAssistantRequest;
17
40
  constructor(kwargs?: i.ListTestCasesByAssistantRequestInterface);
18
41
  toApiJson(): object;
@@ -24,6 +47,20 @@ export declare class ListTestCasesByAssistantResponse implements i.ListTestCases
24
47
  constructor(kwargs?: i.ListTestCasesByAssistantResponseInterface);
25
48
  toApiJson(): object;
26
49
  }
50
+ export declare class ListTestRunsByAssistantRequest implements i.ListTestRunsByAssistantRequestInterface {
51
+ assistant: AssistantKey;
52
+ pagingOptions: PagedRequestOptions;
53
+ static fromProto(proto: any): ListTestRunsByAssistantRequest;
54
+ constructor(kwargs?: i.ListTestRunsByAssistantRequestInterface);
55
+ toApiJson(): object;
56
+ }
57
+ export declare class ListTestRunsByAssistantResponse implements i.ListTestRunsByAssistantResponseInterface {
58
+ testRuns: TestRun[];
59
+ pagingMetadata: PagedResponseMetadata;
60
+ static fromProto(proto: any): ListTestRunsByAssistantResponse;
61
+ constructor(kwargs?: i.ListTestRunsByAssistantResponseInterface);
62
+ toApiJson(): object;
63
+ }
27
64
  export declare class RunTestsRequest implements i.RunTestsRequestInterface {
28
65
  assistant: AssistantKey;
29
66
  testCaseIds: string[];
@@ -37,6 +74,13 @@ export declare class RunTestsResponse implements i.RunTestsResponseInterface {
37
74
  constructor(kwargs?: i.RunTestsResponseInterface);
38
75
  toApiJson(): object;
39
76
  }
77
+ export declare class SortOptions implements i.SortOptionsInterface {
78
+ direction: e.SortDirection;
79
+ field: string;
80
+ static fromProto(proto: any): SortOptions;
81
+ constructor(kwargs?: i.SortOptionsInterface);
82
+ toApiJson(): object;
83
+ }
40
84
  export declare class TestCase implements i.TestCaseInterface {
41
85
  id: string;
42
86
  name: string;
@@ -46,6 +90,28 @@ export declare class TestCase implements i.TestCaseInterface {
46
90
  constructor(kwargs?: i.TestCaseInterface);
47
91
  toApiJson(): object;
48
92
  }
93
+ export declare class TestResult implements i.TestResultInterface {
94
+ id: string;
95
+ name: string;
96
+ chatHistory: ChatMessage[];
97
+ expected: string;
98
+ evaluation: string;
99
+ status: string;
100
+ score: number;
101
+ static fromProto(proto: any): TestResult;
102
+ constructor(kwargs?: i.TestResultInterface);
103
+ toApiJson(): object;
104
+ }
105
+ export declare class TestRun implements i.TestRunInterface {
106
+ id: string;
107
+ status: string;
108
+ testFramework: string;
109
+ testResults: TestResult[];
110
+ created: Date;
111
+ static fromProto(proto: any): TestRun;
112
+ constructor(kwargs?: i.TestRunInterface);
113
+ toApiJson(): object;
114
+ }
49
115
  export declare class UpsertTestCasesRequest implements i.UpsertTestCasesRequestInterface {
50
116
  assistant: AssistantKey;
51
117
  testCases: TestCase[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendasta/ai-assistants",
3
- "version": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.1.0",
6
6
  "@angular/core": "^15.1.0"