Skip to content

Commit fdf6722

Browse files
authored
Merge pull request #734 from narengogi/chore/openai-prediction-param
chore: openai add new 'prediction' param
2 parents de18ab9 + 41a63e8 commit fdf6722

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

src/providers/azure-openai/chatComplete.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ export const AzureOpenAIChatCompleteConfig: ProviderConfig = {
102102
seed: {
103103
param: 'seed',
104104
},
105+
prediction: {
106+
param: 'prediction',
107+
},
105108
};
106109

107110
interface AzureOpenAIChatCompleteResponse extends ChatCompletionResponse {}

src/providers/openai/chatComplete.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ export const OpenAIChatCompleteConfig: ProviderConfig = {
111111
audio: {
112112
param: 'audio',
113113
},
114+
prediction: {
115+
param: 'prediction',
116+
},
114117
};
115118

116119
export interface OpenAIChatCompleteResponse extends ChatCompletionResponse {

src/types/requestBody.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,15 @@ export interface Params {
336336
format: string;
337337
};
338338
service_tier?: string;
339+
prediction?: {
340+
type: string;
341+
content:
342+
| {
343+
type: string;
344+
text: string;
345+
}[]
346+
| string;
347+
};
339348
// Google Vertex AI specific
340349
safety_settings?: any;
341350
// Anthropic specific

0 commit comments

Comments
 (0)