Explorar o código

Init spring ai with dummy values

Aristeidis Tsachlaris hai 3 semanas
pai
achega
64ccfcb9ab
Modificáronse 2 ficheiros con 16 adicións e 10 borrados
  1. 10 8
      pom.xml
  2. 6 2
      src/main/resources/application-local.properties

+ 10 - 8
pom.xml

@@ -5,7 +5,8 @@
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>4.0.5</version>
+    <!-- spring-ai-openai-spring-boot-starter:1.0.0-M6 is not compatible with 4.## springboot version-->
+        <version>3.3.5</version>
         <relativePath/> <!-- lookup parent from repository -->
     </parent>
     <groupId>es.uv.saic</groupId>
@@ -25,17 +26,12 @@
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-webmvc</artifactId>
+            <artifactId>spring-boot-starter-web</artifactId>
         </dependency>
 
         <dependency>
             <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-jpa-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-webmvc-test</artifactId>
+            <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
         </dependency>
 
@@ -44,6 +40,12 @@
             <artifactId>postgresql</artifactId>
             <scope>runtime</scope>
         </dependency>
+
+        <dependency>
+            <groupId>org.springframework.ai</groupId>
+            <artifactId>spring-ai-openai-spring-boot-starter</artifactId>
+            <version>1.0.0-M6</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 6 - 2
src/main/resources/application-local.properties

@@ -1,4 +1,8 @@
-
 # Database config
 spring.datasource.url=jdbc:postgresql://saicd.uv.es:5432/saic_v2
-spring.datasource.password=docent1ia2.l6
+spring.datasource.password=docent1ia2.l6
+
+# AI config
+spring.ai.openai.base-url=http://localhost:8000/v1
+spring.ai.openai.api-key=dummy-key
+spring.ai.openai.chat.options.model=dummy_model