mirror of
				https://github.com/amithkoujalgi/ollama4j.git
				synced 2025-10-31 00:20:40 +01:00 
			
		
		
		
	Compare commits
	
		
			11 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 148b748efb | ||
|   | 9c52368ab2 | ||
|   | 729dd9c41f | ||
|   | 4b49d6004c | ||
|   | 7fd27634d4 | ||
|   | ea64fc4677 | ||
|   | 376cd28e0c | ||
|   | 31c47c6468 | ||
|   | 2e34a1514c | ||
|   | dae99e839d | ||
|   | 877901ccff | 
							
								
								
									
										1
									
								
								.github/workflows/maven-publish.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/maven-publish.yml
									
									
									
									
										vendored
									
									
								
							| @@ -58,7 +58,6 @@ jobs: | |||||||
|           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 -B -ntp -DskipTests -Pci-cd -Darguments="-DskipTests -Pci-cd" release:clean release:prepare release:perform |           mvn -B -ntp -DskipTests -Pci-cd -Darguments="-DskipTests -Pci-cd" release:clean release:prepare release:perform | ||||||
|         #          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 }} | ||||||
|   | |||||||
							
								
								
									
										14
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								Makefile
									
									
									
									
									
								
							| @@ -7,13 +7,7 @@ ut: | |||||||
| it: | it: | ||||||
| 	mvn clean verify -Pintegration-tests | 	mvn clean verify -Pintegration-tests | ||||||
|  |  | ||||||
| #mvn -B clean install -Punit-tests -Dgpg.passphrase="${GPG_PASSPHRASE}" -e | list-releases: | ||||||
| # | 	curl 'https://central.sonatype.com/api/internal/browse/component/versions?sortField=normalizedVersion&sortDirection=asc&page=0&size=12&filter=namespace%3Aio.github.amithkoujalgi%2Cname%3Aollama4j' \ | ||||||
| #release: |       --compressed \ | ||||||
| #	mvn -B clean install -Punit-tests release:clean release:prepare release:perform -Dgpg.passphrase="${GPG_PASSPHRASE}" -e |       --silent | jq '.components[].version' | ||||||
| # |  | ||||||
| #update-version: |  | ||||||
| #	mvn versions:set -DnewVersion=1.0.1 |  | ||||||
| # |  | ||||||
| #deploy: |  | ||||||
| #	mvn clean deploy -Punit-tests -Dgpg.passphrase="$GPG_PASSPHRASE" -e |  | ||||||
							
								
								
									
										35
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								README.md
									
									
									
									
									
								
							| @@ -53,34 +53,25 @@ for [Ollama](https://github.com/jmorganca/ollama/blob/main/docs/api.md) APIs. | |||||||
|  |  | ||||||
| #### Installation | #### Installation | ||||||
|  |  | ||||||
| In your Maven project, add this dependency available in: | In your Maven project, add this dependency: | ||||||
|  |  | ||||||
| - https://central.sonatype.com/artifact/io.github.amithkoujalgi/ollama4j |  | ||||||
| - [Central Repository](https://s01.oss.sonatype.org/#nexus-search;quick~ollama4j) |  | ||||||
|  |  | ||||||
| ```xml | ```xml | ||||||
|  |  | ||||||
| <dependency> | <dependency> | ||||||
|     <groupId>io.github.amithkoujalgi</groupId> |     <groupId>io.github.amithkoujalgi</groupId> | ||||||
|     <artifactId>ollama4j</artifactId> |     <artifactId>ollama4j</artifactId> | ||||||
|     <version>1.0-SNAPSHOT</version> |     <version>1.0.20</version> | ||||||
| </dependency> | </dependency> | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| You might want to include the Maven repository to pull the ollama4j library from. Include this in | [![][lib-shield]][lib] | ||||||
| your `pom.xml`: |  | ||||||
|  |  | ||||||
| ```xml | [lib]: https://central.sonatype.com/artifact/io.github.amithkoujalgi/ollama4j | ||||||
|  |  | ||||||
| <repositories> | [lib-shield]: https://img.shields.io/badge/ollama4j-get_latest_version-blue.svg?style=for-the-badge&labelColor=gray | ||||||
|     <repository> |  | ||||||
|         <id>ollama4j-from-ossrh</id> |  | ||||||
|         <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> |  | ||||||
|     </repository> |  | ||||||
| </repositories> |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| You should also include an implementation of [SL4J](https://www.slf4j.org/) logger in your `pom.xml` file. For example, | You might want to include an implementation of [SL4J](https://www.slf4j.org/) logger in your `pom.xml` file. For | ||||||
|  | example, | ||||||
|  |  | ||||||
| Use `slf4j-jdk14` implementation: | Use `slf4j-jdk14` implementation: | ||||||
|  |  | ||||||
| @@ -106,14 +97,6 @@ or use `logback-classic` implementation: | |||||||
|  |  | ||||||
| or use other suitable implementations. | or use other suitable implementations. | ||||||
|  |  | ||||||
| #### Build: |  | ||||||
|  |  | ||||||
| Build your project to resolve the dependencies: |  | ||||||
|  |  | ||||||
| ```shell |  | ||||||
| mvn clean install -U |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| You can then use the Ollama Java APIs by importing `ollama4j`: | You can then use the Ollama Java APIs by importing `ollama4j`: | ||||||
|  |  | ||||||
| ```java | ```java | ||||||
| @@ -468,6 +451,10 @@ Run integration tests: | |||||||
| make it | make it | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|  | #### Releases | ||||||
|  |  | ||||||
|  | Releases (newer artifact versions) are done automatically on pushj g code to the `main` branch through GitHub Actions CI workflow. | ||||||
|  |  | ||||||
| #### Traction | #### Traction | ||||||
|  |  | ||||||
| [](https://star-history.com/#amithkoujalgi/ollama4j&Date) | [](https://star-history.com/#amithkoujalgi/ollama4j&Date) | ||||||
|   | |||||||
| @@ -1,13 +1,16 @@ | |||||||
| Understanding publishing: | Understanding publishing: | ||||||
| https://dzone.com/articles/how-to-publish-artifacts-to-maven-central | https://dzone.com/articles/how-to-publish-artifacts-to-maven-central | ||||||
|  |  | ||||||
| GPG Signing setup | Reference Repo: | ||||||
|  | https://github.com/dsibilio/badge-maker/tree/main | ||||||
|  |  | ||||||
| ## GPG Setup | ## GPG Signing setup | ||||||
|  |  | ||||||
|  | ### GPG Setup | ||||||
|  |  | ||||||
| https://central.sonatype.org/publish/requirements/gpg/#listing-keys | https://central.sonatype.org/publish/requirements/gpg/#listing-keys | ||||||
|  |  | ||||||
| ### Steps | #### Steps | ||||||
|  |  | ||||||
| - Create key: `gpg --gen-key` and then list keys to verify: `gpg --list-keys` | - Create key: `gpg --gen-key` and then list keys to verify: `gpg --list-keys` | ||||||
| - Distributing Your Public Key: | - Distributing Your Public Key: | ||||||
| @@ -33,4 +36,19 @@ gpg --armor --export-secret-keys 88AA0C903A513340A0F3094326257A6F6F5F24A9 > ~/ol | |||||||
|  |  | ||||||
| https://central.sonatype.org/publish/publish-maven/ | https://central.sonatype.org/publish/publish-maven/ | ||||||
|  |  | ||||||
| ### Steps | ## List release versions | ||||||
|  |  | ||||||
|  | ```shell | ||||||
|  | curl 'https://central.sonatype.com/api/internal/browse/component/versions?sortField=normalizedVersion&sortDirection=desc&page=0&size=12&filter=namespace%3Aio.github.amithkoujalgi%2Cname%3Aollama4j' \ | ||||||
|  |   --compressed \ | ||||||
|  |   --silent | jq '.components[].version' | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | Deployment steps to test. [IGNORE THIS FOR PUBLISHING CONTEXT. THIS IS ONLY TO TEST STUFF OUT LOCALLY] | ||||||
|  |  | ||||||
|  | ```shell | ||||||
|  | # release: | ||||||
|  | mvn -B clean install deploy -Punit-tests -Dgpg.passphrase="${GPG_PASSPHRASE}" -e | ||||||
|  | #or | ||||||
|  | mvn -B clean install -Punit-tests release:clean release:prepare release:perform -Dgpg.passphrase="${GPG_PASSPHRASE}" -e | ||||||
|  | ``` | ||||||
							
								
								
									
										4
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								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.19</version> |     <version>1.0.22</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,7 +39,7 @@ | |||||||
|         <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.19</tag> |         <tag>v1.0.22</tag> | ||||||
|     </scm> |     </scm> | ||||||
|  |  | ||||||
|     <build> |     <build> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user