mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-21 03:18:47 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -62,12 +62,12 @@ export const aiRouter = createTRPCRouter({
|
|||||||
case "ollama":
|
case "ollama":
|
||||||
response = await fetch(`${input.apiUrl}/api/tags`, { headers });
|
response = await fetch(`${input.apiUrl}/api/tags`, { headers });
|
||||||
break;
|
break;
|
||||||
case "gemini":
|
case "gemini":
|
||||||
response = await fetch(
|
response = await fetch(
|
||||||
`${input.apiUrl}/models?key=${encodeURIComponent(input.apiKey)}`,
|
`${input.apiUrl}/models?key=${encodeURIComponent(input.apiKey)}`,
|
||||||
{ headers: {} }
|
{ headers: {} },
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (!input.apiKey)
|
if (!input.apiKey)
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
|
|||||||
@@ -69,11 +69,11 @@ export function selectAIProvider(config: { apiUrl: string; apiKey: string }) {
|
|||||||
});
|
});
|
||||||
case "gemini":
|
case "gemini":
|
||||||
return createOpenAICompatible({
|
return createOpenAICompatible({
|
||||||
name:"gemini",
|
name: "gemini",
|
||||||
baseURL:config.apiUrl,
|
baseURL: config.apiUrl,
|
||||||
queryParams:{ key: config.apiKey},
|
queryParams: { key: config.apiKey },
|
||||||
headers:{}
|
headers: {},
|
||||||
})
|
});
|
||||||
case "custom":
|
case "custom":
|
||||||
return createOpenAICompatible({
|
return createOpenAICompatible({
|
||||||
name: "custom",
|
name: "custom",
|
||||||
|
|||||||
Reference in New Issue
Block a user