feat: dynamic model discovery from vercel ai gateway (#1353)
This commit is contained in:
parent
2b0b42d144
commit
b1da86062e
74 changed files with 7426 additions and 2277 deletions
|
|
@ -5,7 +5,7 @@ import { getDocumentById, saveSuggestions } from "@/lib/db/queries";
|
|||
import type { Suggestion } from "@/lib/db/schema";
|
||||
import type { ChatMessage } from "@/lib/types";
|
||||
import { generateUUID } from "@/lib/utils";
|
||||
import { myProvider } from "../providers";
|
||||
import { getArtifactModel } from "../providers";
|
||||
|
||||
type RequestSuggestionsProps = {
|
||||
session: Session;
|
||||
|
|
@ -38,7 +38,7 @@ export const requestSuggestions = ({
|
|||
>[] = [];
|
||||
|
||||
const { elementStream } = streamObject({
|
||||
model: myProvider.languageModel("artifact-model"),
|
||||
model: getArtifactModel(),
|
||||
system:
|
||||
"You are a help writing assistant. Given a piece of writing, please offer suggestions to improve the piece of writing and describe the change. It is very important for the edits to contain full sentences instead of just words. Max 5 suggestions.",
|
||||
prompt: document.content,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue