mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
OpenAI-derivatives: Remove UI validation - never helped. Fixes #446
This commit is contained in:
+2
-2
@@ -15,7 +15,7 @@ import { DModelSourceId } from '../../store-llms';
|
||||
import { useLlmUpdateModels } from '../useLlmUpdateModels';
|
||||
import { useSourceSetup } from '../useSourceSetup';
|
||||
|
||||
import { isValidOpenAIApiKey, ModelVendorOpenAI } from './openai.vendor';
|
||||
import { ModelVendorOpenAI } from './openai.vendor';
|
||||
|
||||
|
||||
// avoid repeating it all over
|
||||
@@ -34,7 +34,7 @@ export function OpenAISourceSetup(props: { sourceId: DModelSourceId }) {
|
||||
// derived state
|
||||
const { oaiKey, oaiOrg, oaiHost, heliKey, moderationCheck } = access;
|
||||
|
||||
const keyValid = isValidOpenAIApiKey(oaiKey);
|
||||
const keyValid = true; //isValidOpenAIApiKey(oaiKey);
|
||||
const keyError = (/*needsUserKey ||*/ !!oaiKey) && !keyValid;
|
||||
const shallFetchSucceed = oaiKey ? keyValid : !needsUserKey;
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ export const FALLBACK_LLM_TEMPERATURE = 0.5;
|
||||
|
||||
|
||||
// special symbols
|
||||
export const isValidOpenAIApiKey = (apiKey?: string) => !!apiKey && apiKey.startsWith('sk-') && apiKey.length > 40;
|
||||
// export const isValidOpenAIApiKey = (apiKey?: string) => !!apiKey && apiKey.startsWith('sk-') && apiKey.length > 40;
|
||||
|
||||
export interface SourceSetupOpenAI {
|
||||
oaiKey: string;
|
||||
|
||||
Reference in New Issue
Block a user