mirror of
				https://github.com/amithkoujalgi/ollama4j.git
				synced 2025-11-03 01:50:42 +01:00 
			
		
		
		
	Compare commits
	
		
			41 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					1ff5fbfc9f | ||
| 
						 | 
					929242cc26 | ||
| 
						 | 
					d854f82966 | ||
| 
						 | 
					585858a99a | ||
| 
						 | 
					95fa72c1ec | ||
| 
						 | 
					59015dff8f | ||
| 
						 | 
					d601ce0e1e | ||
| 
						 | 
					9820248115 | ||
| 
						 | 
					7ff040f706 | ||
| 
						 | 
					f4b83c2860 | ||
| 
						 | 
					082b708927 | ||
| 
						 | 
					8a895e02fb | ||
| 
						 | 
					b878fb7b3f | ||
| 
						 | 
					5c66d8df5f | ||
| 
						 | 
					ebd34a536d | ||
| 
						 | 
					f2c7169aca | ||
| 
						 | 
					875d1c50b0 | ||
| 
						 | 
					8c4533b704 | ||
| 
						 | 
					bb50a66d80 | ||
| 
						 | 
					e8dccd9b6a | ||
| 
						 | 
					cc1d2c4dc1 | ||
| 
						 | 
					8e93e580cd | ||
| 
						 | 
					97e3df4f44 | ||
| 
						 | 
					8b2dccdae1 | ||
| 
						 | 
					7486016e85 | ||
| 
						 | 
					1b4ad78acf | ||
| 
						 | 
					9936200dcc | ||
| 
						 | 
					5bd3573123 | ||
| 
						 | 
					761f82f321 | ||
| 
						 | 
					9ec8e5155b | ||
| 
						 | 
					47c014968d | ||
| 
						 | 
					e50b978aa0 | ||
| 
						 | 
					51a57384e1 | ||
| 
						 | 
					4425226439 | ||
| 
						 | 
					80f9f6c370 | ||
| 
						 | 
					28b8877477 | ||
| 
						 | 
					c40e9999ab | ||
| 
						 | 
					d21c331b6e | ||
| 
						 | 
					6ac6c09693 | ||
| 
						 | 
					d18148241c | ||
| 
						 | 
					9e9b3bbb43 | 
							
								
								
									
										40
									
								
								.github/workflows/maven-publish.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										40
									
								
								.github/workflows/maven-publish.yml
									
									
									
									
										vendored
									
									
								
							@@ -3,23 +3,21 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
name: Test and Publish Package
 | 
					name: Test and Publish Package
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#on:
 | 
					 | 
				
			||||||
#  release:
 | 
					 | 
				
			||||||
#    types: [created]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					on:
 | 
				
			||||||
  push:
 | 
					  release:
 | 
				
			||||||
    branches: [ "main" ]
 | 
					    types: [ "created" ]
 | 
				
			||||||
  workflow_dispatch:
 | 
					
 | 
				
			||||||
 | 
					#on:
 | 
				
			||||||
 | 
					#  push:
 | 
				
			||||||
 | 
					#    branches: [ "main" ]
 | 
				
			||||||
 | 
					#  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  build:
 | 
					  build:
 | 
				
			||||||
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: write
 | 
					      contents: write
 | 
				
			||||||
      packages: write
 | 
					      packages: write
 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
      - name: Set up JDK 11
 | 
					      - name: Set up JDK 11
 | 
				
			||||||
@@ -29,13 +27,8 @@ jobs:
 | 
				
			|||||||
          distribution: 'adopt-hotspot'
 | 
					          distribution: 'adopt-hotspot'
 | 
				
			||||||
          server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
 | 
					          server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
 | 
				
			||||||
          settings-path: ${{ github.workspace }} # location for the settings.xml file
 | 
					          settings-path: ${{ github.workspace }} # location for the settings.xml file
 | 
				
			||||||
 | 
					 | 
				
			||||||
      #      - name: Run Tests
 | 
					 | 
				
			||||||
      #        run: mvn -U clean verify --file pom.xml
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Build with Maven
 | 
					      - name: Build with Maven
 | 
				
			||||||
        run: mvn --file pom.xml -U clean package -Punit-tests
 | 
					        run: mvn --file pom.xml -U clean package -Punit-tests
 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Set up Apache Maven Central (Overwrite settings.xml)
 | 
					      - name: Set up Apache Maven Central (Overwrite settings.xml)
 | 
				
			||||||
        uses: actions/setup-java@v3
 | 
					        uses: actions/setup-java@v3
 | 
				
			||||||
        with: # running setup-java again overwrites the settings.xml
 | 
					        with: # running setup-java again overwrites the settings.xml
 | 
				
			||||||
@@ -47,14 +40,25 @@ jobs:
 | 
				
			|||||||
          server-password: MAVEN_PASSWORD
 | 
					          server-password: MAVEN_PASSWORD
 | 
				
			||||||
          gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
 | 
					          gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
 | 
				
			||||||
          gpg-passphrase: MAVEN_GPG_PASSPHRASE
 | 
					          gpg-passphrase: MAVEN_GPG_PASSPHRASE
 | 
				
			||||||
 | 
					      - name: Set up Maven cache
 | 
				
			||||||
 | 
					        uses: actions/cache@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          path: ~/.m2/repository
 | 
				
			||||||
 | 
					          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
 | 
				
			||||||
 | 
					          restore-keys: |
 | 
				
			||||||
 | 
					            ${{ runner.os }}-maven-
 | 
				
			||||||
 | 
					      - name: Build
 | 
				
			||||||
 | 
					        run: mvn -B -ntp clean install
 | 
				
			||||||
      - name: Publish to GitHub Packages Apache Maven
 | 
					      - name: Publish to GitHub Packages Apache Maven
 | 
				
			||||||
 | 
					        #        if: >
 | 
				
			||||||
 | 
					        #          github.event_name != 'pull_request' &&
 | 
				
			||||||
 | 
					        #          github.ref_name == 'main' &&
 | 
				
			||||||
 | 
					        #          contains(github.event.head_commit.message, 'release')
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          git config --global user.email "koujalgi.amith@gmail.com"
 | 
					          git config --global user.email "koujalgi.amith@gmail.com"
 | 
				
			||||||
          git config --global user.name "amithkoujalgi"
 | 
					          git config --global user.name "amithkoujalgi"
 | 
				
			||||||
          mvn clean -Punit-tests release:clean release:prepare release:perform -B -Darguments="-DskipTests -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}"
 | 
					          mvn -B -ntp -DskipTests -Pci-cd -Darguments="-DskipTests -Pci-cd" release:clean release:prepare release:perform
 | 
				
			||||||
        #        run: mvn clean deploy -Punit-tests -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}"
 | 
					        #          mvn clean -Punit-tests release:clean release:prepare release:perform -B -Darguments="-DskipTests -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}"
 | 
				
			||||||
 | 
					 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
 | 
					          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
 | 
				
			||||||
          MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
 | 
					          MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								Makefile
									
									
									
									
									
								
							@@ -5,10 +5,10 @@ it:
 | 
				
			|||||||
	mvn clean verify -Pintegration-tests
 | 
						mvn clean verify -Pintegration-tests
 | 
				
			||||||
 | 
					
 | 
				
			||||||
build:
 | 
					build:
 | 
				
			||||||
	mvn clean test install -Punit-tests
 | 
						mvn -B clean test install -Punit-tests -Dgpg.passphrase="${GPG_PASSPHRASE}" -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
release:
 | 
					release:
 | 
				
			||||||
	mvn clean -Punit-tests release:clean release:prepare release:perform -B
 | 
						mvn -B clean install -Punit-tests release:clean release:prepare release:perform -Dgpg.passphrase="${GPG_PASSPHRASE}" -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
update-version:
 | 
					update-version:
 | 
				
			||||||
	mvn versions:set -DnewVersion=1.0.1
 | 
						mvn versions:set -DnewVersion=1.0.1
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										107
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										107
									
								
								pom.xml
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    <groupId>io.github.amithkoujalgi</groupId>
 | 
					    <groupId>io.github.amithkoujalgi</groupId>
 | 
				
			||||||
    <artifactId>ollama4j</artifactId>
 | 
					    <artifactId>ollama4j</artifactId>
 | 
				
			||||||
    <version>1.0.3</version>
 | 
					    <version>1.0.16-SNAPSHOT</version>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <name>Ollama4j</name>
 | 
					    <name>Ollama4j</name>
 | 
				
			||||||
    <description>Java library for interacting with Ollama API.</description>
 | 
					    <description>Java library for interacting with Ollama API.</description>
 | 
				
			||||||
@@ -39,22 +39,22 @@
 | 
				
			|||||||
        <connection>scm:git:git@github.com:amithkoujalgi/ollama4j.git</connection>
 | 
					        <connection>scm:git:git@github.com:amithkoujalgi/ollama4j.git</connection>
 | 
				
			||||||
        <developerConnection>scm:git:https://github.com/amithkoujalgi/ollama4j.git</developerConnection>
 | 
					        <developerConnection>scm:git:https://github.com/amithkoujalgi/ollama4j.git</developerConnection>
 | 
				
			||||||
        <url>https://github.com/amithkoujalgi/ollama4j</url>
 | 
					        <url>https://github.com/amithkoujalgi/ollama4j</url>
 | 
				
			||||||
        <tag>v1.0.3</tag>
 | 
					        <tag>v1.0.1</tag>
 | 
				
			||||||
    </scm>
 | 
					    </scm>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <build>
 | 
					    <build>
 | 
				
			||||||
        <plugins>
 | 
					        <plugins>
 | 
				
			||||||
            <plugin>
 | 
					            <!--            <plugin>-->
 | 
				
			||||||
                <groupId>org.sonatype.plugins</groupId>
 | 
					            <!--                <groupId>org.sonatype.plugins</groupId>-->
 | 
				
			||||||
                <artifactId>nexus-staging-maven-plugin</artifactId>
 | 
					            <!--                <artifactId>nexus-staging-maven-plugin</artifactId>-->
 | 
				
			||||||
                <version>1.6.13</version>
 | 
					            <!--                <version>1.6.13</version>-->
 | 
				
			||||||
                <extensions>true</extensions>
 | 
					            <!--                <extensions>true</extensions>-->
 | 
				
			||||||
                <configuration>
 | 
					            <!--                <configuration>-->
 | 
				
			||||||
                    <serverId>ossrh</serverId>
 | 
					            <!--                    <serverId>ossrh</serverId>-->
 | 
				
			||||||
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
 | 
					            <!--                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>-->
 | 
				
			||||||
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
 | 
					            <!--                    <autoReleaseAfterClose>true</autoReleaseAfterClose>-->
 | 
				
			||||||
                </configuration>
 | 
					            <!--                </configuration>-->
 | 
				
			||||||
            </plugin>
 | 
					            <!--            </plugin>-->
 | 
				
			||||||
            <plugin>
 | 
					            <plugin>
 | 
				
			||||||
                <groupId>org.apache.maven.plugins</groupId>
 | 
					                <groupId>org.apache.maven.plugins</groupId>
 | 
				
			||||||
                <artifactId>maven-source-plugin</artifactId>
 | 
					                <artifactId>maven-source-plugin</artifactId>
 | 
				
			||||||
@@ -81,27 +81,27 @@
 | 
				
			|||||||
                    </execution>
 | 
					                    </execution>
 | 
				
			||||||
                </executions>
 | 
					                </executions>
 | 
				
			||||||
            </plugin>
 | 
					            </plugin>
 | 
				
			||||||
            <plugin>
 | 
					            <!--            <plugin>-->
 | 
				
			||||||
                <groupId>org.apache.maven.plugins</groupId>
 | 
					            <!--                <groupId>org.apache.maven.plugins</groupId>-->
 | 
				
			||||||
                <artifactId>maven-gpg-plugin</artifactId>
 | 
					            <!--                <artifactId>maven-gpg-plugin</artifactId>-->
 | 
				
			||||||
                <version>1.5</version>
 | 
					            <!--                <version>1.5</version>-->
 | 
				
			||||||
                <executions>
 | 
					            <!--                <executions>-->
 | 
				
			||||||
                    <execution>
 | 
					            <!--                    <execution>-->
 | 
				
			||||||
                        <id>sign-artifacts</id>
 | 
					            <!--                        <id>sign-artifacts</id>-->
 | 
				
			||||||
                        <phase>verify</phase>
 | 
					            <!--                        <phase>verify</phase>-->
 | 
				
			||||||
                        <goals>
 | 
					            <!--                        <goals>-->
 | 
				
			||||||
                            <goal>sign</goal>
 | 
					            <!--                            <goal>sign</goal>-->
 | 
				
			||||||
                        </goals>
 | 
					            <!--                        </goals>-->
 | 
				
			||||||
                        <configuration>
 | 
					            <!--                        <configuration>-->
 | 
				
			||||||
                            <!-- This is necessary for gpg to not try to use the pinentry programs -->
 | 
					            <!--                            <!– This is necessary for gpg to not try to use the pinentry programs –>-->
 | 
				
			||||||
                            <gpgArguments>
 | 
					            <!--                            <gpgArguments>-->
 | 
				
			||||||
                                <arg>--pinentry-mode</arg>
 | 
					            <!--                                <arg>--pinentry-mode</arg>-->
 | 
				
			||||||
                                <arg>loopback</arg>
 | 
					            <!--                                <arg>loopback</arg>-->
 | 
				
			||||||
                            </gpgArguments>
 | 
					            <!--                            </gpgArguments>-->
 | 
				
			||||||
                        </configuration>
 | 
					            <!--                        </configuration>-->
 | 
				
			||||||
                    </execution>
 | 
					            <!--                    </execution>-->
 | 
				
			||||||
                </executions>
 | 
					            <!--                </executions>-->
 | 
				
			||||||
            </plugin>
 | 
					            <!--            </plugin>-->
 | 
				
			||||||
            <!-- Surefire Plugin for Unit Tests -->
 | 
					            <!-- Surefire Plugin for Unit Tests -->
 | 
				
			||||||
            <plugin>
 | 
					            <plugin>
 | 
				
			||||||
                <groupId>org.apache.maven.plugins</groupId>
 | 
					                <groupId>org.apache.maven.plugins</groupId>
 | 
				
			||||||
@@ -143,7 +143,7 @@
 | 
				
			|||||||
                <artifactId>maven-release-plugin</artifactId>
 | 
					                <artifactId>maven-release-plugin</artifactId>
 | 
				
			||||||
                <version>3.0.1</version>
 | 
					                <version>3.0.1</version>
 | 
				
			||||||
                <configuration>
 | 
					                <configuration>
 | 
				
			||||||
                    <goals>install</goals>
 | 
					                    <!--                    <goals>install</goals>-->
 | 
				
			||||||
                    <tagNameFormat>v@{project.version}</tagNameFormat>
 | 
					                    <tagNameFormat>v@{project.version}</tagNameFormat>
 | 
				
			||||||
                </configuration>
 | 
					                </configuration>
 | 
				
			||||||
            </plugin>
 | 
					            </plugin>
 | 
				
			||||||
@@ -206,6 +206,9 @@
 | 
				
			|||||||
                <skipUnitTests>false</skipUnitTests>
 | 
					                <skipUnitTests>false</skipUnitTests>
 | 
				
			||||||
                <skipIntegrationTests>true</skipIntegrationTests>
 | 
					                <skipIntegrationTests>true</skipIntegrationTests>
 | 
				
			||||||
            </properties>
 | 
					            </properties>
 | 
				
			||||||
 | 
					            <activation>
 | 
				
			||||||
 | 
					                <activeByDefault>true</activeByDefault>
 | 
				
			||||||
 | 
					            </activation>
 | 
				
			||||||
        </profile>
 | 
					        </profile>
 | 
				
			||||||
        <profile>
 | 
					        <profile>
 | 
				
			||||||
            <id>integration-tests</id>
 | 
					            <id>integration-tests</id>
 | 
				
			||||||
@@ -215,6 +218,40 @@
 | 
				
			|||||||
                <skipIntegrationTests>false</skipIntegrationTests>
 | 
					                <skipIntegrationTests>false</skipIntegrationTests>
 | 
				
			||||||
            </properties>
 | 
					            </properties>
 | 
				
			||||||
        </profile>
 | 
					        </profile>
 | 
				
			||||||
 | 
					        <profile>
 | 
				
			||||||
 | 
					            <id>ci-cd</id>
 | 
				
			||||||
 | 
					            <properties>
 | 
				
			||||||
 | 
					                <test.env>unit</test.env>
 | 
				
			||||||
 | 
					                <skipUnitTests>true</skipUnitTests>
 | 
				
			||||||
 | 
					                <skipIntegrationTests>true</skipIntegrationTests>
 | 
				
			||||||
 | 
					            </properties>
 | 
				
			||||||
 | 
					            <build>
 | 
				
			||||||
 | 
					                <plugins>
 | 
				
			||||||
 | 
					                    <plugin>
 | 
				
			||||||
 | 
					                        <groupId>org.apache.maven.plugins</groupId>
 | 
				
			||||||
 | 
					                        <artifactId>maven-gpg-plugin</artifactId>
 | 
				
			||||||
 | 
					                        <version>3.1.0</version>
 | 
				
			||||||
 | 
					                        <executions>
 | 
				
			||||||
 | 
					                            <execution>
 | 
				
			||||||
 | 
					                                <id>sign-artifacts</id>
 | 
				
			||||||
 | 
					                                <phase>verify</phase>
 | 
				
			||||||
 | 
					                                <goals>
 | 
				
			||||||
 | 
					                                    <goal>sign</goal>
 | 
				
			||||||
 | 
					                                </goals>
 | 
				
			||||||
 | 
					                                <configuration>
 | 
				
			||||||
 | 
					                                    <!-- Prevent gpg from using pinentry programs. Fixes:
 | 
				
			||||||
 | 
					                                         gpg: signing failed: Inappropriate ioctl for device -->
 | 
				
			||||||
 | 
					                                    <gpgArguments>
 | 
				
			||||||
 | 
					                                        <arg>--pinentry-mode</arg>
 | 
				
			||||||
 | 
					                                        <arg>loopback</arg>
 | 
				
			||||||
 | 
					                                    </gpgArguments>
 | 
				
			||||||
 | 
					                                </configuration>
 | 
				
			||||||
 | 
					                            </execution>
 | 
				
			||||||
 | 
					                        </executions>
 | 
				
			||||||
 | 
					                    </plugin>
 | 
				
			||||||
 | 
					                </plugins>
 | 
				
			||||||
 | 
					            </build>
 | 
				
			||||||
 | 
					        </profile>
 | 
				
			||||||
    </profiles>
 | 
					    </profiles>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
		Reference in New Issue
	
	Block a user