mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
Remove extra logs from OpenAI provider
This commit is contained in:
@@ -49,8 +49,6 @@ export const openaiProvider: ProviderConfig = {
|
||||
},
|
||||
|
||||
transformRequest: (request: ProviderRequest, functions?: any) => {
|
||||
console.log('OpenAI transformRequest - Input:', JSON.stringify(request, null, 2))
|
||||
|
||||
const isO1Model = request.model?.startsWith('o1')
|
||||
const isO1Mini = request.model === 'o1-mini'
|
||||
|
||||
@@ -139,8 +137,6 @@ export const openaiProvider: ProviderConfig = {
|
||||
payload.functions = functions
|
||||
payload.function_call = 'auto'
|
||||
}
|
||||
|
||||
console.log('OpenAI transformRequest - Output:', JSON.stringify(payload, null, 2))
|
||||
return payload
|
||||
},
|
||||
|
||||
|
||||
@@ -93,8 +93,6 @@ export async function executeProviderRequest(
|
||||
|
||||
try {
|
||||
while (iterationCount < MAX_ITERATIONS) {
|
||||
console.log(`Processing iteration ${iterationCount + 1}`)
|
||||
|
||||
// Transform the response using provider-specific logic
|
||||
const transformedResponse = provider.transformResponse(currentResponse)
|
||||
content = transformedResponse.content
|
||||
@@ -251,8 +249,6 @@ export async function executeProviderRequest(
|
||||
}
|
||||
|
||||
async function makeProxyRequest(providerId: string, payload: any, apiKey: string) {
|
||||
console.log('Making proxy request for provider:', providerId)
|
||||
|
||||
const response = await fetch('/api/proxy', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -273,6 +269,5 @@ async function makeProxyRequest(providerId: string, payload: any, apiKey: string
|
||||
throw new Error(data.error || 'Provider API error')
|
||||
}
|
||||
|
||||
console.log('Proxy request for provider:', providerId, 'completed')
|
||||
return data.output
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user