FacVain / dil-asistanim

1 stars 0 forks source link

Create prompt builder and schema structures #20

Open FacVain opened 4 months ago

FacVain commented 4 months ago

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