-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathAssistant.ts
129 lines (117 loc) · 3.6 KB
/
Assistant.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/* tslint:disable */
/* eslint-disable */
/**
* Pinecone Assistant Control Plane API
* Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports creating and managing assistants.
*
* The version of the OpenAPI document: 2025-04
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
/**
* The AssistantModel describes the configuration and status of a Pinecone Assistant.
* @export
* @interface Assistant
*/
export interface Assistant {
/**
* The name of the assistant. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
* @type {string}
* @memberof Assistant
*/
name: string;
/**
* Description or directive for the assistant to apply to all responses.
* @type {string}
* @memberof Assistant
*/
instructions?: string | null;
/**
*
* @type {object}
* @memberof Assistant
*/
metadata?: object | null;
/**
*
* @type {string}
* @memberof Assistant
*/
status: AssistantStatusEnum;
/**
* The host where the assistant is deployed.
* @type {string}
* @memberof Assistant
*/
host?: string;
/**
*
* @type {Date}
* @memberof Assistant
*/
createdAt?: Date;
/**
*
* @type {Date}
* @memberof Assistant
*/
updatedAt?: Date;
}
/**
* @export
*/
export const AssistantStatusEnum = {
Initializing: 'Initializing',
Failed: 'Failed',
Ready: 'Ready',
Terminating: 'Terminating',
InitializationFailed: 'InitializationFailed'
} as const;
export type AssistantStatusEnum = typeof AssistantStatusEnum[keyof typeof AssistantStatusEnum];
/**
* Check if a given object implements the Assistant interface.
*/
export function instanceOfAssistant(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "status" in value;
return isInstance;
}
export function AssistantFromJSON(json: any): Assistant {
return AssistantFromJSONTyped(json, false);
}
export function AssistantFromJSONTyped(json: any, ignoreDiscriminator: boolean): Assistant {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'name': json['name'],
'instructions': !exists(json, 'instructions') ? undefined : json['instructions'],
'metadata': !exists(json, 'metadata') ? undefined : json['metadata'],
'status': json['status'],
'host': !exists(json, 'host') ? undefined : json['host'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
};
}
export function AssistantToJSON(value?: Assistant | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'instructions': value.instructions,
'metadata': value.metadata,
'status': value.status,
'host': value.host,
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
'updated_at': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
};
}