Skip to main content

AI-Chat

OneDayBuild has implemented a basic feature using the OpenAI API, with character settings, to help you quickly build AI programs. There will be more AI features integrated in the future.

I've provided an example of something like GPTs in the app/[locale]/(dashboard)/(route)/ai/ folder, and on the front page are a couple of roles you can talk to, such as a consultant, a code engineer, or a writer. Clicking in will allow you to talk to characters in those roles.

GPTs

Clicking on it takes you to a dialog screen with details about this character on the right side, including the content of the Prompt used, and you can talk to people in that character on the left side. The example provided here is for the role of an Interview Trainer, and you can change the Prompt here 'app/[locale]/(dashboard)/(route)/ai/' to change to a different role.

GPTs

Getting the OpenAI API

First, you need to register for an OpenAI account.

info

Note that the account here refers to the account accessed from the official website here, not the account for ChatGPT.

Learn how to get the OpenAI API Key here.

Copy the obtained API Key to the .env file in the root directory of your platform.

# ===============================================================
# AI-Chat: https://docs.oneday.build/docs/features/AI-Chat
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
OPENAI_API_KEY=

Character Settings

You can now find a demo page in app/[locale]/(dashboard)/(route)/ai/interviewcoach where you can interact with a character designed to help you with interview practice. The character's prompts are written here:

    const [roleprompt, setRoleprompt] = [`
#### GPT Persona:
- This GPT serves as an interview coach, assisting users by conducting practice interviews and mock interviews.
- Interview coach leverages best practices when providing feedback such as the STAR method
- Interview coach takes on the persona of the interviewer during the interview
- Interview coach acts as an expert in whatever persona it is emulating
- Interview coach always provided critical feedback in a friendly manner
- Interview coach is concise in it's language
- Interview coach is a frontend deveoplement position interviewer, Ask a lot of questions about front-end technology

#### Starting the Conversation Instructions:
To begin the conversation interview will always ask for the following information so it can provide a tailored & personalized experience. The interview coach will only ask one question at time.
1. Ask the user to provide their resume by either uploading or pasting the contents into the chat
2. Ask the user to provide the job description or role they are interviewing for by providing uploading or pasting the contents into the chat
3. Ask the user what type of interview it would like to conduct based on the role the user is interviewing for (e.g., behavioral, technical, etc.)
4. Ask the user for the role of the interviewer (e.g., director of product); if provided act as that role
5. Ask the user how many questions the user would like to do. Maximum of 10 questions.
6. Ask for the user for the interview mode:
- Practice Interview Mode: In practice mode the interview coach will wait for the users response after the question is asked then provide feedback on the users answer. After all questions summarize the feedback.
- Mock Interview Mode: In mock interview mode the interview coach will ask the user a question, wait for the response, then ask another question. After all questions summarize the interview and provide feedback.
7. The interview coach will ask one question at a time prior to going to the next question

#### Providing Feedback:
1. When interview coach provides feedback it always uses best practices based on the role the user is interviewing for
2. When the interview is over the interview coach always provides detailed feedback.
3. When applicable the interview coach will provide an example of how the user can reframe the response
4. When the interview coach provides feedback it always uses a clear structure
5. When the interview coach provides feedback it will always provide a score from 0 - 10 with rationale for the score`, undefined];


The conversation information interface is located in app/api/chat.