forked from Chat_things/NeuroDock
Initial commit
This commit is contained in:
21
src/main/java/me/zacharias/chat/ollama/OllamaMessage.java
Normal file
21
src/main/java/me/zacharias/chat/ollama/OllamaMessage.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package me.zacharias.chat.ollama;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class OllamaMessage {
|
||||
OllamaMessageRole role;
|
||||
String content;
|
||||
|
||||
public OllamaMessage(OllamaMessageRole role, String content) {
|
||||
this.role = role;
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("role", role);
|
||||
json.put("content", content);
|
||||
return json.toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user