Closed nspyke closed 1 month ago
Does anyone know when this issue will be addressed?
@nspyke @egosumcarlos, could you confirm this issue can be reproduced on the latest snapshot? (1.0.0-SNAPSHOT
). I see the issue on 1.0.0-M2
but not on the latest snapshot. Thanks!
Hi @sobychacko
Yes, I'm happy to confirm that this is fixed in the SNAPSHOT version!! :)
Would it be possible to please tag a new version with this fix included?
Maybe 1.0.0-M2.1
if M3 is still a while away.
This bug is the only thing stopping me from adopting this amazing Spring package/library and I've been delaying the build of my OpenAI API endpoints while waiting for the fix.
Hi @nspyke, my pom.xml is this, and use the version 1.0.0-SNAPSHOT, but the issue persist, what is my error?:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.9</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.ntt</groupId>
<artifactId>appgenai</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>appgenai</name>
<description>Demo project for Spring Boot</description>
<url/>
<licenses>
<license/>
</licenses>
<developers>
<developer/>
</developers>
<scm>
<connection/>
<developerConnection/>
<tag/>
<url/>
</scm>
<properties>
<java.version>17</java.version>
<spring-ai.version>1.0.0-SNAPSHOT</spring-ai.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-azure-openai-spring-boot-starter</artifactId>
</dependency>
<!--<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-redis-store-spring-boot-starter</artifactId>
</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-bom</artifactId>
<version>${spring-ai.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
Thanks!
@egosumcarlos, Can you ensure that you are using the 1.0.0-SNAPSHOT
version of spring-ai? Maybe run a mvn depedency:tree?
Duplicate from Azure SDK as I'm not sure where the issue lies exactly as while the exception is triggered in the Azure Open AI SDK, using the SDK directly does not cause this issue.
Azure/azure-sdk-for-java #40898
Bug description In a Spring Boot WebFlux project, calling the stream method of Spring AI which then calls the Azure OpenAI SDK, it throws the exception block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-nio-2
Exception or Stack Trace
To Reproduce
@Configuration
and@EnableWebFlux
Environment Spring AI version 1.0.0-M1 Java version 21 Spring Boot Web Flux stater 3.3.1
Expected behavior Azure OpenAI chat streams a response
Minimal Complete Reproducible example Create a new Spring Boot 3.3.1 project through initializer, add Spring AI and Azure Open AI dependencies and configure them in application.yaml for autoconfiguration.