Class ChatCompletionRequest
- java.lang.Object
-
- com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
-
public class ChatCompletionRequest extends Object
Represents a request to the OpenAI chat completion API, including model, messages, and optional parameters like max tokens, temperature, and response format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChatCompletionRequest.ResponseFormat
static class
ChatCompletionRequest.ResponseFormatType
static class
ChatCompletionRequest.Role
-
Field Summary
Fields Modifier and Type Field Description static ChatCompletionRequest.ResponseFormat
JSON
-
Constructor Summary
Constructors Constructor Description ChatCompletionRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getMaxTokens()
List<ChatCompletionMessage>
getMessages()
String
getModel()
ChatCompletionRequest.ResponseFormat
getResponseFormat()
Integer
getSeed()
Double
getTemperature()
List<ChatTool>
getTools()
Boolean
isStream()
void
setMaxTokens(Integer maxTokens)
void
setMessages(List<ChatCompletionMessage> messages)
void
setModel(String model)
void
setResponseFormat(ChatCompletionRequest.ResponseFormat responseFormat)
void
setSeed(Integer seed)
void
setStream(Boolean stream)
void
setTemperature(Double temperature)
void
setTools(List<ChatTool> tools)
-
-
-
Field Detail
-
JSON
public static final ChatCompletionRequest.ResponseFormat JSON
-
-
Method Detail
-
getModel
public String getModel()
-
setModel
public void setModel(String model)
-
getMessages
public List<ChatCompletionMessage> getMessages()
-
setMessages
public void setMessages(List<ChatCompletionMessage> messages)
-
getMaxTokens
public Integer getMaxTokens()
-
setMaxTokens
public void setMaxTokens(Integer maxTokens)
-
isStream
public Boolean isStream()
-
setStream
public void setStream(Boolean stream)
-
getTemperature
public Double getTemperature()
-
setTemperature
public void setTemperature(Double temperature)
-
getResponseFormat
public ChatCompletionRequest.ResponseFormat getResponseFormat()
-
setResponseFormat
public void setResponseFormat(ChatCompletionRequest.ResponseFormat responseFormat)
-
getSeed
public Integer getSeed()
-
setSeed
public void setSeed(Integer seed)
-
-