@@ -52,15 +52,21 @@ const IndexPage = () => {
5252 setTranscription ( '' ) ;
5353 setTranslation ( '' ) ;
5454
55- // Construct a representation of the curl request for transparency
56- const curlCommand = `curl -X POST "https://llm.us104.amazee.ai/v1/audio/transcriptions" \\
57- -H "Authorization: Bearer [GATSBY_LITELLM_API_KEY]" \\
58- -F "file=@${ file . name } " \\
59- -F "model=${ transcribeModel } " \\
60- -F "response_format=${ responseFormat } " \\
61- -F "diarize=${ diarize } " \\
62- ${ timestampGranularity . map ( g => `-F "timestamp_granularities[]=${ g } "` ) . join ( ' \\\n ' ) } \\
63- ${ sourceLang ? `-F "language=${ sourceLang } "` : '' } ` ;
55+ // Construct a representation of the curl request for transparency.
56+ // Mirrors llmService.ts: optional params only included when they apply.
57+ const apiBase = process . env . GATSBY_LITELLM_API_URL || 'https://llm.us104.amazee.ai' ;
58+ const curlCommand = [
59+ `curl -X POST "${ apiBase } /v1/audio/transcriptions"` ,
60+ `-H "Authorization: Bearer [GATSBY_LITELLM_API_KEY]"` ,
61+ `-F "file=@${ file . name } "` ,
62+ `-F "model=${ transcribeModel } "` ,
63+ ...( diarize ? [ `-F "diarize=true"` ] : [ ] ) ,
64+ ...( responseFormat === 'verbose_json'
65+ ? timestampGranularity . map ( g => `-F "timestamp_granularities[]=${ g } "` )
66+ : [ ] ) ,
67+ `-F "response_format=${ responseFormat } "` ,
68+ ...( sourceLang ? [ `-F "language=${ sourceLang } "` ] : [ ] ) ,
69+ ] . join ( ' \\\n ' ) ;
6470
6571 setLastCurlRequest ( curlCommand ) ;
6672 setIsCurlExpanded ( true ) ;
@@ -76,7 +82,7 @@ const IndexPage = () => {
7682 setIsTranslating ( true ) ;
7783
7884 // Construct a representation of the curl request for translation
79- const translateCurl = `curl -X POST "https://llm.us104.amazee.ai /v1/chat/completions" \\
85+ const translateCurl = `curl -X POST "${ apiBase } /v1/chat/completions" \\
8086 -H "Content-Type: application/json" \\
8187 -H "Authorization: Bearer [GATSBY_LITELLM_API_KEY]" \\
8288 -d '{
@@ -248,7 +254,7 @@ const IndexPage = () => {
248254 onChange = { ( e ) => setChatModel ( e . target . value ) }
249255 >
250256 < option value = "chat" > chat</ option >
251- < option value = "claude-4-5-sonnet " > claude-4-5-sonnet </ option >
257+ < option value = "claude-sonnet-4-6 " > claude-sonnet-4-6 </ option >
252258 </ select >
253259 </ div >
254260
@@ -360,6 +366,7 @@ const IndexPage = () => {
360366 isTranslating = { isTranslating }
361367 transcribeModel = { transcribeModel }
362368 translateModel = { chatModel }
369+ responseFormat = { responseFormat }
363370 />
364371 </ div >
365372 </ div >
0 commit comments