homanp / langchain-ui

🧬 The open source chat-ai toolkit

Home Page:https://langchain-ui.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

have any method to config proxy by default fetch?

xiongwn opened this issue · comments

have any method to config proxy by default fetch?

in node_modules\langchain\dist\util\axios-fetch-adapter.js
langchain link openapi default by fetch not axios.post
stageOne = await fetch(request)

I try https-proxy-agent but not work.
So if you have any method to change proxy in fetch adapter?

By the way,clash for windows global mode did not change nodejs network proxy.

What are you trying to achieve?

have any method to config proxy by default fetch?

in node_modules\langchain\dist\util\axios-fetch-adapter.js

langchain link openapi default by fetch not axios.post

stageOne = await fetch(request)

I try https-proxy-agent but not work.

So if you have any method to change proxy in fetch adapter?

By the way,clash for windows global mode did not change nodejs network proxy.

You should be able to configure a proxy using the LangChainJS proxy config.

OpenAIChat({
  ...openAIConfig,
}, {
  basePath,
  baseOptions: {
    httpsAgent: agent,
    adapter: null
  }
})