Open nemoo opened 1 year ago
now I came up with this approach to change the ChatService.live method to use the proxy:
ClientConfig.live(
ClientConfig(proxy =
Some(
Proxy(URL.fromString("http://10.0.2.2:3128").toOption.get)))) >>>
ZClient.fromConfig >>> Chat.live >+>
ZLayer(Ref.make(NonEmptyChunk(ChatCompletionRequestMessage(Role.System, instructions)))) >>>
ZLayer.fromFunction(ChatService.apply[Service](_, _, _, handler))
This compiles, but the proxy is still not used.
I had asked for help here: https://github.com/zio/zio-openai/issues/31 and followed the solution to provide my own custom ClientConfig for zio http. But now I think the config issue is maybe more automaton specific, so I am opening this question here.
I am just trying to use the automaton behind a proxy.
When I try this:
It still simply does not use the proxy.
Any ideas how I could configure the proxy otherwise?