integrate ai gateway and improve ui components (#1145)
This commit is contained in:
parent
7315ced92f
commit
dff2191611
29 changed files with 235 additions and 217 deletions
|
|
@ -3,7 +3,7 @@ import {
|
|||
extractReasoningMiddleware,
|
||||
wrapLanguageModel,
|
||||
} from 'ai';
|
||||
import { xai } from '@ai-sdk/xai';
|
||||
import { gateway } from '@ai-sdk/gateway';
|
||||
import {
|
||||
artifactModel,
|
||||
chatModel,
|
||||
|
|
@ -23,15 +23,12 @@ export const myProvider = isTestEnvironment
|
|||
})
|
||||
: customProvider({
|
||||
languageModels: {
|
||||
'chat-model': xai('grok-2-vision-1212'),
|
||||
'chat-model': gateway.languageModel('xai/grok-2-vision-1212'),
|
||||
'chat-model-reasoning': wrapLanguageModel({
|
||||
model: xai('grok-3-mini-beta'),
|
||||
model: gateway.languageModel('xai/grok-3-mini-beta'),
|
||||
middleware: extractReasoningMiddleware({ tagName: 'think' }),
|
||||
}),
|
||||
'title-model': xai('grok-2-1212'),
|
||||
'artifact-model': xai('grok-2-1212'),
|
||||
},
|
||||
imageModels: {
|
||||
'small-model': xai.imageModel('grok-2-image'),
|
||||
'title-model': gateway.languageModel('xai/grok-2-1212'),
|
||||
'artifact-model': gateway.languageModel('xai/grok-2-1212'),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue