mirror of
				https://github.com/amithkoujalgi/ollama4j.git
				synced 2025-10-31 00:20:40 +01:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | e1b9d42771 | ||
|   | 1a086c37c0 | ||
|   | 3ed3187ba9 | ||
|   | b7cd81a7f5 | 
							
								
								
									
										11
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								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.69</version> |     <version>1.0.70</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.69</tag> |         <tag>v1.0.70</tag> | ||||||
|     </scm> |     </scm> | ||||||
|  |  | ||||||
|     <build> |     <build> | ||||||
| @@ -149,7 +149,12 @@ | |||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>com.fasterxml.jackson.core</groupId> |             <groupId>com.fasterxml.jackson.core</groupId> | ||||||
|             <artifactId>jackson-databind</artifactId> |             <artifactId>jackson-databind</artifactId> | ||||||
|             <version>2.15.3</version> |             <version>2.17.1</version> | ||||||
|  |         </dependency> | ||||||
|  |         <dependency> | ||||||
|  |             <groupId>com.fasterxml.jackson.datatype</groupId> | ||||||
|  |             <artifactId>jackson-datatype-jsr310</artifactId> | ||||||
|  |             <version>2.17.1</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>ch.qos.logback</groupId> |             <groupId>ch.qos.logback</groupId> | ||||||
|   | |||||||
| @@ -1,5 +1,7 @@ | |||||||
| package io.github.amithkoujalgi.ollama4j.core.models; | package io.github.amithkoujalgi.ollama4j.core.models; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import com.fasterxml.jackson.core.JsonProcessingException; | import com.fasterxml.jackson.core.JsonProcessingException; | ||||||
| import io.github.amithkoujalgi.ollama4j.core.utils.Utils; | import io.github.amithkoujalgi.ollama4j.core.utils.Utils; | ||||||
| @@ -11,7 +13,9 @@ public class Model { | |||||||
|   private String name; |   private String name; | ||||||
|   private String model; |   private String model; | ||||||
|   @JsonProperty("modified_at") |   @JsonProperty("modified_at") | ||||||
|   private String modifiedAt; |   private LocalDateTime modifiedAt; | ||||||
|  |   @JsonProperty("expires_at") | ||||||
|  |   private LocalDateTime expiresAt; | ||||||
|   private String digest; |   private String digest; | ||||||
|   private long size; |   private long size; | ||||||
|   @JsonProperty("details") |   @JsonProperty("details") | ||||||
|   | |||||||
| @@ -8,10 +8,18 @@ import java.net.URISyntaxException; | |||||||
| import java.net.URL; | import java.net.URL; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.databind.ObjectMapper; | import com.fasterxml.jackson.databind.ObjectMapper; | ||||||
|  | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; | ||||||
|  |  | ||||||
| public class Utils { | public class Utils { | ||||||
|  |  | ||||||
|  |   private static ObjectMapper objectMapper; | ||||||
|  |  | ||||||
|   public static ObjectMapper getObjectMapper() { |   public static ObjectMapper getObjectMapper() { | ||||||
|     return new ObjectMapper(); |     if(objectMapper == null) { | ||||||
|  |       objectMapper = new ObjectMapper(); | ||||||
|  |       objectMapper.registerModule(new JavaTimeModule()); | ||||||
|  |     } | ||||||
|  |     return objectMapper; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   public static byte[] loadImageBytesFromUrl(String imageUrl) |   public static byte[] loadImageBytesFromUrl(String imageUrl) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user