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

Download SpringAI project as zip file #37

Merged
merged 14 commits into from
Nov 7, 2024
Merged

Download SpringAI project as zip file #37

merged 14 commits into from
Nov 7, 2024

Conversation

corradodebari
Copy link
Contributor

SpringAI project download, supporting OpenAI/OLLAMA deployment.
Include OpenAI API REST interface for chat completion.
Not yet the full configuration available.

@corradodebari corradodebari self-assigned this Oct 21, 2024
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.0</version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be version 3.3.5

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be tested

<name>myspringai</name>
<description>Simple AI Application using OpenAPI Service</description>
<properties>
<java.version>17</java.version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not Java 21?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For backward compat.

Comment on lines +84 to +87
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<version>23.5.0.24.07</version>
Copy link

@andytael andytael Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be using the spring boot starter:

        <dependency>
            <groupId>com.oracle.database.spring</groupId>
            <artifactId>oracle-spring-boot-starter-ucp</artifactId>
            <version>24.3.0</version>
        </dependency>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be tested with 23ai Vector Search; will check.

@@ -0,0 +1,50 @@
server:
servlet:
context-path: /v1
Copy link

@andytael andytael Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use Java 21, then add:

  threads:
    virtual:
      enabled: true

Comment on lines +231 to +235
spring:
datasource:
url: ${{spring.datasource.url}}
username: ${{spring.datasource.username}}
password: ${{spring.datasource.password}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this code is the code that goes into application.yaml if so we should use a pooled connection:

  datasource:
    url: ${spring.datasource.url}
    username: ${spring.datasource.username}
    password: ${spring.datasource.password}
    driver-class-name: oracle.jdbc.OracleDriver
    type: oracle.ucp.jdbc.PoolDataSource
    oracleucp:
      connection-factory-class-name: oracle.jdbc.pool.OracleDataSource
      connection-pool-name: UCPConnectionPool
      initial-pool-size: 15
      min-pool-size: 10
      max-pool-size: 30

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checking

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 7, 2024
Copy link
Contributor

@gotsysdba gotsysdba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gotsysdba gotsysdba merged commit a140c05 into main Nov 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants