Skip to content

Commit 1687921

Browse files
committed
fix: update audio-adapter-openai version to 1.0.1 and make httpExtra parameter optional in getClientCountry function
1 parent 4796aeb commit 1687921

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

live-demo/app/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

live-demo/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"description": "",
1818
"dependencies": {
1919
"@adminforth/agent": "^1.38.0",
20-
"@adminforth/audio-adapter-openai": "^1.0.0",
20+
"@adminforth/audio-adapter-openai": "^1.0.1",
2121
"@adminforth/audit-log": "^1.9.18",
2222
"@adminforth/background-jobs": "^1.11.4",
2323
"@adminforth/bulk-ai-flow": "^1.24.3",

live-demo/app/resources/agent_resources/placeholderMessages.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ function normalizeCountryCode(countryCode?: string): string {
5656
: 'XX';
5757
}
5858

59-
export function getClientCountry(httpExtra: HttpExtra): string {
59+
export function getClientCountry(httpExtra?: HttpExtra): string {
6060
return normalizeCountryCode(
61-
httpExtra.headers['cf-ipcountry'] ?? httpExtra.headers['CF-IPCountry'],
61+
httpExtra?.headers['cf-ipcountry'] ?? httpExtra?.headers['CF-IPCountry'],
6262
);
6363
}
6464

@@ -141,7 +141,7 @@ export async function getLocalizedPlaceholderMessages({
141141
httpExtra,
142142
}: {
143143
completionAdapter: CompletionAdapter;
144-
httpExtra: HttpExtra;
144+
httpExtra?: HttpExtra;
145145
}): Promise<string[]> {
146146
const countryCode = getClientCountry(httpExtra);
147147
const topLanguage = getTopTerritoryLanguage(countryCode);

0 commit comments

Comments
 (0)