mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(OpenAI Node): Add proxy agent for Message an assistant operation (#19250)
This commit is contained in:
@@ -24,6 +24,7 @@ import { getTracingConfig } from '@utils/tracing';
|
|||||||
|
|
||||||
import { formatToOpenAIAssistantTool, getChatMessages } from '../../helpers/utils';
|
import { formatToOpenAIAssistantTool, getChatMessages } from '../../helpers/utils';
|
||||||
import { assistantRLC } from '../descriptions';
|
import { assistantRLC } from '../descriptions';
|
||||||
|
import { getProxyAgent } from '@utils/httpProxyAgent';
|
||||||
|
|
||||||
const properties: INodeProperties[] = [
|
const properties: INodeProperties[] = [
|
||||||
assistantRLC,
|
assistantRLC,
|
||||||
@@ -193,6 +194,9 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
|
|||||||
maxRetries: options.maxRetries ?? 2,
|
maxRetries: options.maxRetries ?? 2,
|
||||||
timeout: options.timeout ?? 10000,
|
timeout: options.timeout ?? 10000,
|
||||||
baseURL,
|
baseURL,
|
||||||
|
fetchOptions: {
|
||||||
|
dispatcher: getProxyAgent(baseURL),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const agent = new OpenAIAssistantRunnable({ assistantId, client, asAgent: true });
|
const agent = new OpenAIAssistantRunnable({ assistantId, client, asAgent: true });
|
||||||
|
|||||||
Reference in New Issue
Block a user