mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-05 23:02:10 +03:00
fix: resolve typecheck error and add missing hi translations
This commit is contained in:
@@ -402,12 +402,13 @@ export function translateNonStreamingResponse(
|
||||
* Helper to convert an OpenAI chat.completion JSON object to Claude format for non-streaming.
|
||||
*/
|
||||
function convertOpenAINonStreamingToClaude(openaiResponse: JsonRecord): JsonRecord {
|
||||
const isChoicesArray = Array.isArray(openaiResponse.choices);
|
||||
const choices = openaiResponse.choices as unknown[] | undefined;
|
||||
const isChoicesArray = Array.isArray(choices);
|
||||
if (!isChoicesArray && openaiResponse.object !== "chat.completion") {
|
||||
return openaiResponse; // If it doesn't look like OpenAI, return as-is
|
||||
}
|
||||
|
||||
const choice = isChoicesArray ? openaiResponse.choices[0] : null;
|
||||
const choice = isChoicesArray ? choices[0] : null;
|
||||
const choiceObj = choice ? toRecord(choice) : {};
|
||||
const messageObj = choiceObj.message ? toRecord(choiceObj.message) : {};
|
||||
|
||||
|
||||
@@ -2512,7 +2512,8 @@
|
||||
"waitingForIFlowAuthorization": "Waiting for iFlow authorization...",
|
||||
"waitingForAntigravityAuthorization": "Waiting for Antigravity authorization...",
|
||||
"Authorization": "Authorization",
|
||||
"exchangingCodeForTokens": "Exchanging code for tokens..."
|
||||
"exchangingCodeForTokens": "Exchanging code for tokens...",
|
||||
"waitingForQoderAuthorization": "Waiting for Qoder authorization..."
|
||||
},
|
||||
"landing": {
|
||||
"brandName": "ओम्निरूट",
|
||||
|
||||
Reference in New Issue
Block a user