forked from Mirror/ollama4j
Updates to javadoc
This commit is contained in:
parent
d716b81342
commit
65f00defcf
@ -3,9 +3,9 @@ package io.github.amithkoujalgi.ollama4j.core;
|
||||
import io.github.amithkoujalgi.ollama4j.core.exceptions.OllamaBaseException;
|
||||
import io.github.amithkoujalgi.ollama4j.core.models.*;
|
||||
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.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.CustomModelFilePathRequest;
|
||||
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}.
|
||||
*
|
||||
* 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
|
||||
* @return
|
||||
|
@ -1,11 +1,10 @@
|
||||
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 com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
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.
|
||||
*
|
||||
* @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
|
||||
@AllArgsConstructor
|
||||
|
@ -17,18 +17,18 @@ import lombok.RequiredArgsConstructor;
|
||||
/**
|
||||
* 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
|
||||
@AllArgsConstructor
|
||||
@RequiredArgsConstructor
|
||||
public class OllamaChatRequestModel implements OllamaRequestBody{
|
||||
public class OllamaChatRequestModel implements OllamaRequestBody {
|
||||
|
||||
@NonNull
|
||||
private String model;
|
||||
@NonNull private String model;
|
||||
|
||||
@NonNull
|
||||
private List<OllamaChatMessage> messages;
|
||||
@NonNull private List<OllamaChatMessage> messages;
|
||||
|
||||
private String format;
|
||||
private Options options;
|
||||
@ -44,5 +44,4 @@ public class OllamaChatRequestModel implements OllamaRequestBody{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user