Skip to content
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

CloudRag #382

Open
coderpwh1024 opened this issue Jan 20, 2025 · 0 comments
Open

CloudRag #382

coderpwh1024 opened this issue Jan 20, 2025 · 0 comments

Comments

@coderpwh1024
Copy link

coderpwh1024 commented Jan 20, 2025

CloudRag bug or not use ,but LocalRagController can run

Rag-example
use Coud Rag exmaple ,
appear 400 - {"code":"InvalidParameter","message":"Illegal X-DashScope-OpenAPISource field.","request_id":"bbd99821-35fc-97ed-bb33-62ffef74d90b"}

Image

my question

  1. I want to run CloudRAG through my ai dashscope api-key
  2. CloudRag not run ,appear 400 , message: Illegal X-DashScope-OpenAPISource field
  3. example LocalRagController in my local can run

my code
I reference official example

https://github.com/springaialibaba/spring-ai-alibaba-examples/blob/main/spring-ai-alibaba-rag-example/rag-example/src/main/java/com/alibaba/cloud/ai/example/rag/cloud/CloudRagService.java

https://github.com/coderpwh1024/Spring-Ai-Alibaba/tree/master/spring-ai-alibaba-example-nacos/rag-example

version

  1. SpringBoot: 3.3.3
  2. Spring-Ai: 1.0.0-M3
  3. Spring-Ai-Alibaba: 1.0.0-M3.1
  4. SpringCloudAlibaba: 2023.0.1.0
  5. nacos: 2.4.3

pom detail


4.0.0

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.3.3</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>com.coderpwh</groupId>
<artifactId>rag-example</artifactId>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
    <!-- utils -->
    <commons-lang3.version>3.14.0</commons-lang3.version>
    <!-- Spring AI -->
    <spring-ai-alibaba.version>1.0.0-M3.1</spring-ai-alibaba.version>
    <spring-ai.version>1.0.0-M3</spring-ai.version>
    <spring-cloud-alibaba.version>2023.0.1.0</spring-cloud-alibaba.version>
</properties>

<version>1.0-SNAPSHOT</version>

<dependencies>
    <dependency>
        <groupId>com.alibaba.cloud.ai</groupId>
        <artifactId>spring-ai-alibaba-starter</artifactId>
        <version>${spring-ai-alibaba.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>com.alibaba.cloud</groupId>
        <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
        <version>${spring-cloud-alibaba.version}</version>
    </dependency>

    <dependency>
        <groupId>com.alibaba.cloud</groupId>
        <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
        <version>${spring-cloud-alibaba.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-bootstrap</artifactId>
        <version>4.0.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.ai</groupId>
        <artifactId>spring-ai-pdf-document-reader</artifactId>
        <version>${spring-ai.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.ai</groupId>
        <artifactId>spring-ai-elasticsearch-store-spring-boot-starter</artifactId>
        <version>${spring-ai.version}</version>
    </dependency>
</dependencies>


<profiles>
    <profile>
        <id>dev</id>
        <properties>
            <spring.profiles.active>dev</spring.profiles.active>
        </properties>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
    </profile>
    <profile>
        <id>qa</id>
        <properties>
            <spring.profiles.active>qa</spring.profiles.active>
        </properties>
    </profile>
    <profile>
        <id>prod</id>
        <properties>
            <spring.profiles.active>prod</spring.profiles.active>
        </properties>
    </profile>
</profiles>


<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>${maven-deploy-plugin.version}</version>
            <configuration>
                <skip>true</skip>
            </configuration>
        </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>
</repositories>

application

Image
]

email
email: [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant