forked from Chat_things/NeuroDock
22 lines
473 B
Java
22 lines
473 B
Java
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();
|
|
}
|
|
}
|