diff --git a/client/src/components/Input/BingStyles.jsx b/client/src/components/Input/BingStyles.jsx index 6929515118..65ba7b12e1 100644 --- a/client/src/components/Input/BingStyles.jsx +++ b/client/src/components/Input/BingStyles.jsx @@ -25,7 +25,7 @@ function BingStyles(props, ref) { return ( {icon} {endpoint} - {endpoint in ['azureOpenAI', 'openAI'] && $} + {!!['azureOpenAI', 'openAI'].find(e => e === endpoint) && $} ); } diff --git a/client/src/components/Input/OpenAIOptions/index.jsx b/client/src/components/Input/OpenAIOptions/index.jsx new file mode 100644 index 0000000000..b7fdfc280c --- /dev/null +++ b/client/src/components/Input/OpenAIOptions/index.jsx @@ -0,0 +1,51 @@ +import React, { useState, useEffect, forwardRef } from 'react'; +import { Tabs, TabsList, TabsTrigger } from '../../ui/Tabs.tsx'; +import { useRecoilValue, useRecoilState } from 'recoil'; +import { Button } from '../../ui/Button.tsx'; + +import store from '~/store'; + +function OpenAIOptions({ conversation = {} }) { + const { endpoint } = conversation; + const { advancedMode, setAdvancedMode } = useState(false); + + const triggerAdvancedMode = () => setAdvancedMode(prev => !prev); + + if (endpoint !== 'openAI') return null; + + const { model } = conversation; + + const cardStyle = + 'shadow-md px-4 h-[40px] rounded-md min-w-[75px] font-normal bg-white border-black/10 border dark:bg-gray-700 text-black dark:text-white'; + + return ( + <> +
+ + +
+
+
title
+
content
+
+ + ); +} + +export default OpenAIOptions; diff --git a/client/src/components/Input/index.jsx b/client/src/components/Input/index.jsx index 94cc2891c7..3eb86caaef 100644 --- a/client/src/components/Input/index.jsx +++ b/client/src/components/Input/index.jsx @@ -2,6 +2,7 @@ import React, { useEffect, useRef, useState } from 'react'; import { useRecoilValue, useRecoilState } from 'recoil'; import SubmitButton from './SubmitButton'; import AdjustToneButton from './AdjustToneButton'; +import OpenAIOptions from './OpenAIOptions'; import BingStyles from './BingStyles'; import EndpointMenu from './Endpoints/EndpointMenu'; import Footer from './Footer'; @@ -135,15 +136,11 @@ export default function TextChat({ isSearchView = false }) {
- - + {isSubmitting ? ( ) : null} + +
e === endpoint); + console.log(enabled); return (
{visible && enabled ? (