forked from groq/groq-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshared.ts
More file actions
91 lines (72 loc) · 2.17 KB
/
Copy pathshared.ts
File metadata and controls
91 lines (72 loc) · 2.17 KB
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
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export interface ErrorObject {
message: string;
type: string;
code?: string | null;
/**
* Debug information including input and output token IDs and strings. Only present
* when debug=true in the request.
*/
debug?: ErrorObject.Debug;
failed_generation?: string | null;
param?: string | null;
schema_code?: string | null;
schema_kind?: string | null;
schema_path?: string | null;
/**
* Segments of the schema path relevant to validation errors.
*/
schema_path_segments?: Array<string>;
}
export namespace ErrorObject {
/**
* Debug information including input and output token IDs and strings. Only present
* when debug=true in the request.
*/
export interface Debug {
/**
* Token IDs for the input.
*/
input_token_ids?: Array<number>;
/**
* Token strings for the input.
*/
input_tokens?: Array<string>;
/**
* Token IDs for the output.
*/
output_token_ids?: Array<number>;
/**
* Token strings for the output.
*/
output_tokens?: Array<string>;
}
}
export interface FunctionDefinition {
/**
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
* underscores and dashes, with a maximum length of 64.
*/
name: string;
/**
* A description of what the function does, used by the model to choose when and
* how to call the function.
*/
description?: string;
/**
* Function parameters defined as a JSON Schema object. Refer to
* https://json-schema.org/understanding-json-schema/ for schema documentation.
*/
parameters?: FunctionParameters;
/**
* Whether to enable strict schema adherence when generating the output. If set to
* true, the model will always follow the exact schema defined in the `schema`
* field. Only a subset of JSON Schema is supported when `strict` is `true`.
*/
strict?: boolean;
}
/**
* Function parameters defined as a JSON Schema object. Refer to
* https://json-schema.org/understanding-json-schema/ for schema documentation.
*/
export type FunctionParameters = { [key: string]: unknown };