fine tuning
This commit is contained in:
+6
-14
@@ -33,20 +33,7 @@ type ProbeResult = {
|
||||
error?: string;
|
||||
};
|
||||
|
||||
const PI_PROVIDERS: { key: string; piId: string }[] = [
|
||||
{ key: 'Anthropic', piId: 'anthropic' },
|
||||
{ key: 'OpenAI', piId: 'openai' },
|
||||
{ key: 'Google', piId: 'google' },
|
||||
{ key: 'Groq', piId: 'groq' },
|
||||
{ key: 'Mistral', piId: 'mistral' },
|
||||
{ key: 'xAI', piId: 'xai' },
|
||||
{ key: 'OpenRouter', piId: 'openrouter' },
|
||||
{ key: 'MiniMax', piId: 'minimax' },
|
||||
{ key: 'Hugging Face', piId: 'huggingface' },
|
||||
{ key: 'Azure OpenAI', piId: 'azure-openai-responses' },
|
||||
{ key: 'ZAI', piId: 'zai' },
|
||||
{ key: 'Cerebras', piId: 'cerebras' },
|
||||
];
|
||||
type PiProvider = { key: string; piId: string };
|
||||
|
||||
type ProbeState = { step: 'url' } | { step: 'probing' } | { step: 'auth'; probe: ProbeResult } | { step: 'saving' };
|
||||
|
||||
@@ -55,6 +42,11 @@ export const AIHarnessesSection = () => {
|
||||
const queryClient = useQueryClient();
|
||||
const [installing, setInstalling] = useState(false);
|
||||
|
||||
const { data: PI_PROVIDERS = [] as PiProvider[] } = useQuery({
|
||||
queryKey: ['PI_MONO_PROVIDERS'],
|
||||
queryFn: () => client.get<PiProvider[]>('/server-settings/pi-mono/providers'),
|
||||
});
|
||||
|
||||
const { data: piMonoVersion, isLoading: piMonoLoading } = useQuery({
|
||||
queryKey: ['PI_MONO_VERSION'],
|
||||
queryFn: () => client.get<VersionInfo>('/server-settings/pi-mono/version'),
|
||||
|
||||
@@ -366,6 +366,10 @@ export const PROVIDERS: { key: string; piId: string }[] = [
|
||||
{ key: 'Cerebras', piId: 'cerebras' },
|
||||
];
|
||||
|
||||
piMonoRouter.get('/providers', async (ctx) => {
|
||||
return ctx.json(PROVIDERS);
|
||||
});
|
||||
|
||||
piMonoRouter.get('/auth', async (ctx) => {
|
||||
const auth = await readAuthJson();
|
||||
const providers = PROVIDERS.filter((p) => auth[p.piId]?.key?.trim()).map((p) => p.key);
|
||||
|
||||
Reference in New Issue
Block a user