Skip to content

Commit a8f7269

Browse files
committed
refactor: Organization
1 parent fa43fe1 commit a8f7269

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

src/models/chat/ChatCompletionsRequest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import { DocumentSchema } from "./DocumentSchema";
22
import { ToolDefinition } from "./ToolDefinition";
33
import { ChatMessageParam } from "./ChatMessage";
44
import { ResponseFormat } from "./ResponseFormat";
5+
import { ChatModel } from "./ChatModel";
56

67
export interface ChatCompletionCreateParamsBase {
7-
model: string;
8+
model: ChatModel;
89
messages: ChatMessageParam[];
910
max_tokens?: number | null;
1011
temperature?: number | null;

src/models/chat/ChatModel.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export type ChatModel =
2+
| "jamba-1.5-mini"
3+
| "jamba-1.5-large"
4+
5+
export declare namespace ChatModel {
6+
export {
7+
type ChatModel,
8+
}
9+
}

src/models/chat/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,8 @@ export {
4848

4949
export {
5050
type ToolFunction,
51-
} from "./ToolFunction";
51+
} from "./ToolFunction";
52+
53+
export {
54+
type ChatModel,
55+
} from "./ChatModel";

src/models/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ export {
2323
type ChoiceDelta,
2424
type ChoicesChunk,
2525
type ChatCompletionChunk,
26+
type ChatModel,
2627
} from "./chat";

src/resources/chat/chat.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,3 @@ import { Completions } from "./completions";
55
export class Chat extends APIResource {
66
completions: Completions = new Completions(this._client);
77
}
8-
9-
10-
export type ChatModel =
11-
| "jamba-1.5-mini"
12-
| "jamba-1.5-large"

0 commit comments

Comments
 (0)