Add canvas interface (#461)
This commit is contained in:
parent
1a74a5ca9a
commit
b3cb0ea755
44 changed files with 7454 additions and 4691 deletions
|
|
@ -1,13 +1,11 @@
|
|||
import { openai } from '@ai-sdk/openai';
|
||||
import { experimental_wrapLanguageModel as wrapLanguageModel } from 'ai';
|
||||
|
||||
import { type Model } from '@/lib/model';
|
||||
|
||||
import { customMiddleware } from './custom-middleware';
|
||||
|
||||
export const customModel = (modelName: Model['name']) => {
|
||||
export const customModel = (apiIdentifier: string) => {
|
||||
return wrapLanguageModel({
|
||||
model: openai(modelName),
|
||||
model: openai(apiIdentifier),
|
||||
middleware: customMiddleware,
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue