rm small suffix, more quote fixes
This commit is contained in:
parent
6e6cf7830a
commit
4cfe5b90d5
4 changed files with 22 additions and 24 deletions
|
|
@ -1,17 +1,17 @@
|
|||
"use client";
|
||||
'use client';
|
||||
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useWindowSize } from "usehooks-ts";
|
||||
import Link from 'next/link';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useWindowSize } from 'usehooks-ts';
|
||||
|
||||
import { ModelSelector } from "@/components/model-selector";
|
||||
import { SidebarToggle } from "@/components/sidebar-toggle";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { PlusIcon, VercelIcon } from "./icons";
|
||||
import { useSidebar } from "./ui/sidebar";
|
||||
import { memo } from "react";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip";
|
||||
import { VisibilityType, VisibilitySelector } from "./visibility-selector";
|
||||
import { ModelSelector } from '@/components/model-selector';
|
||||
import { SidebarToggle } from '@/components/sidebar-toggle';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { PlusIcon, VercelIcon } from './icons';
|
||||
import { useSidebar } from './ui/sidebar';
|
||||
import { memo } from 'react';
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip';
|
||||
import { VisibilityType, VisibilitySelector } from './visibility-selector';
|
||||
|
||||
function PureChatHeader({
|
||||
chatId,
|
||||
|
|
@ -40,7 +40,7 @@ function PureChatHeader({
|
|||
variant="outline"
|
||||
className="order-2 md:order-1 md:px-2 px-2 md:h-fit ml-auto md:ml-0"
|
||||
onClick={() => {
|
||||
router.push("/");
|
||||
router.push('/');
|
||||
router.refresh();
|
||||
}}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { xai } from "@ai-sdk/xai";
|
|||
|
||||
export const myProvider = customProvider({
|
||||
languageModels: {
|
||||
"chat-model-small": xai("grok-2-1212"),
|
||||
"chat-model": xai("grok-2-1212"),
|
||||
"chat-model-reasoning": wrapLanguageModel({
|
||||
model: fireworks("accounts/fireworks/models/deepseek-r1"),
|
||||
middleware: extractReasoningMiddleware({ tagName: "think" }),
|
||||
|
|
@ -27,7 +27,7 @@ export const myProvider = customProvider({
|
|||
|
||||
You can replace the models with any other provider of your choice. You will need to install the provider library and switch the models accordingly.
|
||||
|
||||
For example, if you want to use Anthropic's `claude-3-5-sonnet` model for `chat-model-large`, you can replace the `xai` model with the `anthropic` model as shown below.
|
||||
For example, if you want to use Anthropic's `claude-3-5-sonnet` model for `chat-model`, you can replace the `xai` model with the `anthropic` model as shown below.
|
||||
|
||||
```ts
|
||||
import { customProvider } from "ai";
|
||||
|
|
@ -35,8 +35,7 @@ import { anthropic } from "@ai-sdk/anthropic";
|
|||
|
||||
export const myProvider = customProvider({
|
||||
languageModels: {
|
||||
"chat-model-small": openai("gpt-4o-mini"),
|
||||
"chat-model-large": anthropic("claude-3-5-sonnet"), // Replace openai with anthropic
|
||||
"chat-model": anthropic("claude-3-5-sonnet"), // Replace xai with anthropic
|
||||
"chat-model-reasoning": wrapLanguageModel({
|
||||
model: fireworks("accounts/fireworks/models/deepseek-r1"),
|
||||
middleware: extractReasoningMiddleware({ tagName: "think" }),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
export const DEFAULT_CHAT_MODEL: string = 'chat-model-small';
|
||||
export const DEFAULT_CHAT_MODEL: string = 'chat-model';
|
||||
|
||||
interface ChatModel {
|
||||
id: string;
|
||||
|
|
@ -8,9 +8,9 @@ interface ChatModel {
|
|||
|
||||
export const chatModels: Array<ChatModel> = [
|
||||
{
|
||||
id: 'chat-model-small',
|
||||
name: 'Small model',
|
||||
description: 'Small model for fast, lightweight tasks',
|
||||
id: 'chat-model',
|
||||
name: 'Chat model',
|
||||
description: 'Primary model for all-purpose chat',
|
||||
},
|
||||
{
|
||||
id: 'chat-model-reasoning',
|
||||
|
|
|
|||
|
|
@ -17,8 +17,7 @@ import {
|
|||
export const myProvider = isTestEnvironment
|
||||
? customProvider({
|
||||
languageModels: {
|
||||
'chat-model-small': chatModel,
|
||||
'chat-model-large': chatModel,
|
||||
'chat-model': chatModel,
|
||||
'chat-model-reasoning': reasoningModel,
|
||||
'title-model': titleModel,
|
||||
'artifact-model': artifactModel,
|
||||
|
|
@ -26,7 +25,7 @@ export const myProvider = isTestEnvironment
|
|||
})
|
||||
: customProvider({
|
||||
languageModels: {
|
||||
'chat-model-small': xai('grok-2-1212'),
|
||||
'chat-model': xai('grok-2-1212'),
|
||||
'chat-model-reasoning': wrapLanguageModel({
|
||||
model: fireworks('accounts/fireworks/models/deepseek-r1'),
|
||||
middleware: extractReasoningMiddleware({ tagName: 'think' }),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue