io.github.sinri.AiOnHttpMix.azure.openai.chatgpt.message.UserMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AiOnHttpMix Show documentation
Show all versions of AiOnHttpMix Show documentation
A library to handle LLM APIs over HTTP service.
The newest version!
package io.github.sinri.AiOnHttpMix.azure.openai.chatgpt.message;
import io.github.sinri.AiOnHttpMix.azure.openai.chatgpt.ChatGptRole;
import io.vertx.core.json.JsonObject;
import org.jetbrains.annotations.NotNull;
public final class UserMessage implements OpenAIChatGptMessage {
private JsonObject jsonObject;
public UserMessage(@NotNull JsonObject jsonObject) {
this.jsonObject = jsonObject;
this.jsonObject.put("role", ChatGptRole.user.name());
}
@Override
public @NotNull JsonObject toJsonObject() {
return jsonObject;
}
@Override
public @NotNull OpenAIChatGptMessage reloadDataFromJsonObject(@NotNull JsonObject jsonObject) {
this.jsonObject = jsonObject;
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy