diff --git a/.env.example b/.env.example index 8c312611..fade4201 100644 --- a/.env.example +++ b/.env.example @@ -18,7 +18,12 @@ ANTHROPIC_API_KEY= # Get your OpenRouter API Key in your account settings - # https://openrouter.ai/settings/keys # You only need this environment variable set if you want to use OpenRouter models -OPEN_ROUTER_API_KEY= +OPEN_ROUTER_API_KEY=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 + +# Get your Google Generative AI API Key by following these instructions - +# https://console.cloud.google.com/apis/credentials +# You only need this environment variable set if you want to use Google Generative AI models +GOOGLE_GENERATIVE_AI_API_KEY= # You only need this environment variable set if you want to use oLLAMA models #EXAMPLE http://localhost:11434 diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx index e3c7f5fd..abfdaa57 100644 --- a/app/components/chat/BaseChat.tsx +++ b/app/components/chat/BaseChat.tsx @@ -7,9 +7,10 @@ import { Menu } from '~/components/sidebar/Menu.client'; import { IconButton } from '~/components/ui/IconButton'; import { Workbench } from '~/components/workbench/Workbench.client'; import { classNames } from '~/utils/classNames'; -import { MODEL_LIST } from '~/utils/constants'; +import { MODEL_LIST, DEFAULT_PROVIDER } from '~/utils/constants'; import { Messages } from './Messages.client'; import { SendButton } from './SendButton.client'; +import { useState } from 'react'; import styles from './BaseChat.module.scss'; @@ -21,6 +22,40 @@ const EXAMPLE_PROMPTS = [ { text: 'How do I center a div?' }, ]; +const providerList = [...new Set(MODEL_LIST.map((model) => model.provider))] + +const ModelSelector = ({ model, setModel, modelList, providerList }) => { + const [provider, setProvider] = useState(DEFAULT_PROVIDER); + return ( +
+ + +
+ ) +} + const TEXTAREA_MIN_HEIGHT = 76; interface BaseChatProps { @@ -110,20 +145,12 @@ export const BaseChat = React.forwardRef( 'sticky bottom-0': chatStarted, })} > - {/* Model selection dropdown */} -
- -
+