Updates to javadoc

This commit is contained in:
Amith Koujalgi 2024-02-12 22:03:01 +05:30
parent d716b81342
commit 65f00defcf
3 changed files with 19 additions and 21 deletions

View File

@ -3,9 +3,9 @@ package io.github.amithkoujalgi.ollama4j.core;
import io.github.amithkoujalgi.ollama4j.core.exceptions.OllamaBaseException; import io.github.amithkoujalgi.ollama4j.core.exceptions.OllamaBaseException;
import io.github.amithkoujalgi.ollama4j.core.models.*; import io.github.amithkoujalgi.ollama4j.core.models.*;
import io.github.amithkoujalgi.ollama4j.core.models.chat.OllamaChatMessage; import io.github.amithkoujalgi.ollama4j.core.models.chat.OllamaChatMessage;
import io.github.amithkoujalgi.ollama4j.core.models.chat.OllamaChatRequestBuilder;
import io.github.amithkoujalgi.ollama4j.core.models.chat.OllamaChatRequestModel; import io.github.amithkoujalgi.ollama4j.core.models.chat.OllamaChatRequestModel;
import io.github.amithkoujalgi.ollama4j.core.models.chat.OllamaChatResult; import io.github.amithkoujalgi.ollama4j.core.models.chat.OllamaChatResult;
import io.github.amithkoujalgi.ollama4j.core.models.chat.OllamaChatRequestBuilder;
import io.github.amithkoujalgi.ollama4j.core.models.request.CustomModelFileContentsRequest; import io.github.amithkoujalgi.ollama4j.core.models.request.CustomModelFileContentsRequest;
import io.github.amithkoujalgi.ollama4j.core.models.request.CustomModelFilePathRequest; import io.github.amithkoujalgi.ollama4j.core.models.request.CustomModelFilePathRequest;
import io.github.amithkoujalgi.ollama4j.core.models.request.ModelEmbeddingsRequest; import io.github.amithkoujalgi.ollama4j.core.models.request.ModelEmbeddingsRequest;
@ -441,7 +441,7 @@ public class OllamaAPI {
/** /**
* Ask a question to a model using an {@link OllamaChatRequestModel}. This can be constructed using an {@link OllamaChatRequestBuilder}. * Ask a question to a model using an {@link OllamaChatRequestModel}. This can be constructed using an {@link OllamaChatRequestBuilder}.
* *
* Hint: the {@link OllamaChatRequestModel#getStream()} property is not implemented * Hint: the OllamaChatRequestModel#getStream() property is not implemented.
* *
* @param request request object to be sent to the server * @param request request object to be sent to the server
* @return * @return

View File

@ -1,11 +1,10 @@
package io.github.amithkoujalgi.ollama4j.core.models.chat; package io.github.amithkoujalgi.ollama4j.core.models.chat;
import com.fasterxml.jackson.core.JsonProcessingException;
import static io.github.amithkoujalgi.ollama4j.core.utils.Utils.getObjectMapper; import static io.github.amithkoujalgi.ollama4j.core.utils.Utils.getObjectMapper;
import com.fasterxml.jackson.core.JsonProcessingException;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -15,7 +14,7 @@ import lombok.RequiredArgsConstructor;
/** /**
* Defines a single Message to be used inside a chat request against the ollama /api/chat endpoint. * Defines a single Message to be used inside a chat request against the ollama /api/chat endpoint.
* *
* @see https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-chat-completion * @see <a href="https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-chat-completion">Generate chat completion</a>
*/ */
@Data @Data
@AllArgsConstructor @AllArgsConstructor

View File

@ -17,18 +17,18 @@ import lombok.RequiredArgsConstructor;
/** /**
* Defines a Request to use against the ollama /api/chat endpoint. * Defines a Request to use against the ollama /api/chat endpoint.
* *
* @see https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-chat-completion * @see <a
* href="https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-chat-completion">Generate
* Chat Completion</a>
*/ */
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@RequiredArgsConstructor @RequiredArgsConstructor
public class OllamaChatRequestModel implements OllamaRequestBody { public class OllamaChatRequestModel implements OllamaRequestBody {
@NonNull @NonNull private String model;
private String model;
@NonNull @NonNull private List<OllamaChatMessage> messages;
private List<OllamaChatMessage> messages;
private String format; private String format;
private Options options; private Options options;
@ -44,5 +44,4 @@ public class OllamaChatRequestModel implements OllamaRequestBody{
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
} }