Merge branch 'cleanAbout' of https://github.com/janhq/jan into cleanAbout
This commit is contained in:
commit
5a11d4a69f
@ -155,8 +155,8 @@ const config = {
|
||||
algolia: {
|
||||
appId: process.env.ALGOLIA_APP_ID || "XXX",
|
||||
apiKey: process.env.ALGOLIA_API_KEY || "XXX",
|
||||
indexName: "jan",
|
||||
contextualSearch: false,
|
||||
indexName: "jan_docs",
|
||||
contextualSearch: true,
|
||||
insights: true,
|
||||
},
|
||||
// SEO Docusarus
|
||||
|
||||
@ -233,7 +233,10 @@ export default function DropdownListSidebar() {
|
||||
</SelectPortal>
|
||||
</Select>
|
||||
|
||||
<OpenAiKeyInput selectedModel={selectedModel} />
|
||||
<OpenAiKeyInput
|
||||
selectedModel={selectedModel}
|
||||
serverEnabled={serverEnabled}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -7,9 +7,10 @@ import { useEngineSettings } from '@/hooks/useEngineSettings'
|
||||
|
||||
type Props = {
|
||||
selectedModel?: Model
|
||||
serverEnabled: boolean
|
||||
}
|
||||
|
||||
const OpenAiKeyInput: React.FC<Props> = ({ selectedModel }) => {
|
||||
const OpenAiKeyInput: React.FC<Props> = ({ selectedModel, serverEnabled }) => {
|
||||
const [openAISettings, setOpenAISettings] = useState<
|
||||
{ api_key: string } | undefined
|
||||
>(undefined)
|
||||
@ -34,6 +35,7 @@ const OpenAiKeyInput: React.FC<Props> = ({ selectedModel }) => {
|
||||
API Key
|
||||
</label>
|
||||
<Input
|
||||
disabled={serverEnabled}
|
||||
id="assistant-instructions"
|
||||
placeholder="Enter your API_KEY"
|
||||
defaultValue={openAISettings?.api_key}
|
||||
|
||||
@ -309,8 +309,7 @@ const LocalServerScreen = () => {
|
||||
: 'w-0 translate-x-full opacity-0'
|
||||
)}
|
||||
>
|
||||
<CardSidebar title="Model" hideMoreVerticalAction>
|
||||
<div className="px-2">
|
||||
<div className="px-4">
|
||||
<div className="mt-4">
|
||||
<DropdownListSidebar />
|
||||
</div>
|
||||
@ -337,7 +336,6 @@ const LocalServerScreen = () => {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</CardSidebar>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user