All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.composum.ai.backend.base.service.chat.GPTMessageRole Maven / Gradle / Ivy

There is a newer version: 2.3.2
Show newest version
package com.composum.ai.backend.base.service.chat;

import com.google.gson.annotations.SerializedName;

/**
 * Role of a {@link GPTChatMessage} in a dialog with ChatGPT.
 *
 * @see "https://platform.openai.com/docs/guides/chat"
 */
public enum GPTMessageRole {

    /**
     * The system message helps set the behavior of the assistant.
     */
    @SerializedName("system")
    SYSTEM("system"),
    /**
     * The user messages help instruct the assistant.
     */
    @SerializedName("user")
    USER("user"),
    /**
     * The assistant messages help store prior responses. It can also serve as an example of desired behavior.
     */
    @SerializedName("assistant")
    ASSISTANT("assistant"),

    /**
     * A result of a tool call the assistant made.
     */
    @SerializedName("tool")
    TOOL("tool");

    private final String externalRepresentation;

    GPTMessageRole(String externalRepresentation) {
        this.externalRepresentation = externalRepresentation;
    }

    @Override
    public String toString() {
        return externalRepresentation;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy