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 classChatCompletionRequest.ResponseFormatstatic classChatCompletionRequest.ResponseFormatTypestatic classChatCompletionRequest.Role
-
Field Summary
Fields Modifier and Type Field Description static ChatCompletionRequest.ResponseFormatJSON
-
Constructor Summary
Constructors Constructor Description ChatCompletionRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetMaxTokens()List<ChatCompletionMessage>getMessages()StringgetModel()ChatCompletionRequest.ResponseFormatgetResponseFormat()IntegergetSeed()DoublegetTemperature()List<ChatTool>getTools()BooleanisStream()voidsetMaxTokens(Integer maxTokens)voidsetMessages(List<ChatCompletionMessage> messages)voidsetModel(String model)voidsetResponseFormat(ChatCompletionRequest.ResponseFormat responseFormat)voidsetSeed(Integer seed)voidsetStream(Boolean stream)voidsetTemperature(Double temperature)voidsetTools(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)
-
-