OpenAI-derivatives: Remove UI validation - never helped. Fixes #446

This commit is contained in:
Enrico Ros
2024-04-09 16:28:09 -07:00
parent 2e99533f96
commit 4919e38e3e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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
View File
@@ -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;