Create prompt builder and schema structures.
Prompt builder structure should build prompts that we will use to obtain the desired response from GPT models.
Builder Structure must export a function that the Gpt-Request module will use to obtain the correct prompt and schema for the given user request.
Implementation Details
Create promptBuilder which takes user requests and creates ChatPromptTemplate for the given writing pattern.
Builder must use the system message to create ChatPromptTemplate.
Builder must also return the correct JSON schema for the desired pattern.
Schemas structure must hold the system message and zod schema for all writing patterns.
Design
Create promptBuilder.js and schemas.js files inside GPT-Request module.
Prompt Builder must export buildPrompt(req) function that returns prompt, schema.
Schemas must provide a structure that holds and exports zod schemas for writing patterns.
Prompt builder must check the user request and retrieve the appropriate schema from the schemas file.
Prompt builder must correctly build ChatPromptTemplate for the given pattern.
Tasks
Create promptBuilder.js and schemas.js files inside GPT-Request module.
Create buildPrompt(req) function that returns prompt, schema.
Export buildPrompt function so that it could be used in the module.
Write conditionals and retrieve the correct schema from schemas.js.
Correctly build ChatPromptTemplate for the given pattern.
Convert schema to JSON using zodToJsonSchema function
Expected Output
JSON schema and the ChatPromptTemplate which includes system and human message
Acceptance Criteria
The structure must return the correct Schema and prompt messages for the desired writing patterns so that the GPT model could generate the appropriate response for the task.
Task Description
Create prompt builder and schema structures. Prompt builder structure should build prompts that we will use to obtain the desired response from GPT models. Builder Structure must export a function that the Gpt-Request module will use to obtain the correct prompt and schema for the given user request.
Implementation Details
Create promptBuilder which takes user requests and creates ChatPromptTemplate for the given writing pattern. Builder must use the system message to create ChatPromptTemplate. Builder must also return the correct JSON schema for the desired pattern. Schemas structure must hold the system message and zod schema for all writing patterns.
Design
Create promptBuilder.js and schemas.js files inside GPT-Request module. Prompt Builder must export buildPrompt(req) function that returns prompt, schema. Schemas must provide a structure that holds and exports zod schemas for writing patterns. Prompt builder must check the user request and retrieve the appropriate schema from the schemas file. Prompt builder must correctly build ChatPromptTemplate for the given pattern.
Tasks
Expected Output
JSON schema and the ChatPromptTemplate which includes system and human message
Acceptance Criteria
The structure must return the correct Schema and prompt messages for the desired writing patterns so that the GPT model could generate the appropriate response for the task.
Screenshots