Class OpenAICompatiblePromptParameters
java.lang.Object
rocks.imsofa.ai.puppychatter.PromptParameters
rocks.imsofa.ai.puppychatter.openai.OpenAICompatiblePromptParameters
- All Implemented Interfaces:
OpenAISpec
-
Field Summary
FieldsFields inherited from class rocks.imsofa.ai.puppychatter.PromptParameters
responseVerifier, role -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget the JSON schema for the OpenAI specgetTools()voidsetJsonSchema(Class jsonSchema) set the JSON schema for the OpenAI spec the given class must be a Java class comforming to the Json Schema specification 2021-12 (Draft 2020-12) if the schema class is set, a response_format block will be gerenated like this:voidMethods inherited from class rocks.imsofa.ai.puppychatter.PromptParameters
getResponseVerifier, getRole, setResponseVerifier, setRole
-
Field Details
-
jsonSchema
-
tools
-
-
Constructor Details
-
OpenAICompatiblePromptParameters
-
-
Method Details
-
getJsonSchema
Description copied from interface:OpenAISpecget the JSON schema for the OpenAI spec- Specified by:
getJsonSchemain interfaceOpenAISpec- Returns:
-
setJsonSchema
Description copied from interface:OpenAISpecset the JSON schema for the OpenAI spec the given class must be a Java class comforming to the Json Schema specification 2021-12 (Draft 2020-12) if the schema class is set, a response_format block will be gerenated like this:"response_format": { "type": "json_schema", "json_schema": { "name": "weather", "strict": true, "schema": { "type": "object", "properties": { "location": {"type": "string"}, "temperature": {"type": "number"}, "conditions": {"type": "string"} }, "required": ["location", "temperature", "conditions"], "additionalProperties": false } } }- Specified by:
setJsonSchemain interfaceOpenAISpec- Parameters:
jsonSchema-
-
getTools
- Specified by:
getToolsin interfaceOpenAISpec
-
setTools
- Specified by:
setToolsin interfaceOpenAISpec
-