-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for customization of webclient for OpenAI #609
Milestone
Comments
@deepakn27 I believe that you want to customize WebClient to make it to connect to an HTTP proxy (instead of resolving the IP address of |
deepakn27
changed the title
Getting error on return this.chatClient.stream(prompt)
Support for customization of webclient for OpenAI
May 5, 2024
bmoussaud
pushed a commit
to bmoussaud/spring-ai
that referenced
this issue
May 27, 2024
…toConfiguration Fixes spring-projects#609
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description
Getting Error while doing chatClient.stream(prompt).
This only happens for chatClient.stream(prompt). My finding is it happens due to WebClient
CURL and chatClient.call(prompt) work fine.
Caused by: java.net.UnknownHostException: Failed to resolve 'api.openai.com' [A(1)]
Caused by: io.netty.resolver.dns.DnsNameResolverTimeoutException: [19766: /192.168.29.1:53] DefaultDnsQuestion(api.openai.com. IN A) query '19766' via UDP timed out after 5000 milliseconds (no stack trace available)
Environment
Please provide as many details as possible: Spring AI version - 0.8.1,
Java version - 17,
vector store - SimpleVectorStore (InMemory)
Steps to reproduce
call below method for any prompt.
Prompt prompt = new Prompt("tell me something about java");
return this.chatClient.stream(prompt).map((ChatResponse chatResponse) -> {
Expected behavior
Code should stream proper llm response
Minimal Complete Reproducible example
Prompt prompt = new Prompt("tell me something about java");
return this.chatClient.stream(prompt).map((ChatResponse chatResponse) -> {
The text was updated successfully, but these errors were encountered: