Open jccarles opened 3 months ago
You can configure this in the fetchRequestOptions
https://v02.api.js.langchain.com/classes/_langchain_core.runnables_remote.RemoteRunnable.html
const remoteChain = new RemoteRunnable({
url: url,
fetchRequestOptions: {credentials: 'include'}
});
Hello,
We are using langserve js client the following way
Then we stream the request as
Digging in the code it looks like stream is calling under the hood js fetch function the following way as seen here: https://github.com/langchain-ai/langchainjs/blob/dbb3b59623ee5ce4bf675bbf41a6e3e044ae0802/langchain-core/src/runnables/remote.ts#L278
The best would be to be able to pass an additional parameter to fetch:
credentials
see here section how to pass cookies. The updated version could be:with and update to remoteRunnableOption as
or hardcoded for example:
Thank you !