Skip to content

ReadTimeoutException with Spring AI for Moderate-Sized Prompts (<4K characters) #2195

Answered by LiveNathan
LiveNathan asked this question in Q&A
Discussion options

You must be logged in to vote

It worked!

Here's my final passing test:

@Test
    void givenLongResponseTime_whenProcessingWithStreamingChatClient_thenResponseIsSuccessful() {
        ChatClient chatClient = ChatClient.create(chatModel);
        var converter = new BeanOutputConverter<>(new ParameterizedTypeReference<AiResponseKeywordsAligned>() {
        });
        String systemPrompt = "You are a keyword research assistant specialized in SEO and Google Keyword Planner, helping users discover high-quality, long-tail keywords for niche businesses. {format}";
        String userMessage = """
                ## How to rate industry alignment
                Using the following scale, rate how closely each keyword aligns…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@LiveNathan
Comment options

@andbi
Comment options

@LiveNathan
Comment options

@LiveNathan
Comment options

Answer selected by LiveNathan
@andbi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants