Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OV-52: add chat controller #63

Merged
merged 55 commits into from
Aug 30, 2024
Merged

Conversation

sergiy4
Copy link
Collaborator

@sergiy4 sergiy4 commented Aug 24, 2024

Added logic for storing chat history and an endpoint for interacting with the chat

Description:

  • Implemented functionality for storing chat history.
  • Added logic for deleting old messages and clearing the chat history.

ROUTES:

  1. POST http://localhost:3001/api/v1/chat/ ( for text generation )
  2. DELETE http://localhost:3001/api/v1/chat/ ( for deleting the session )

1
Photo 1: Generating text using OpenAI

2
Photo 2: Providing context

3
Photo 3: Storing chat history (the chat has context because it knows my name)

image
Photo 4: Deleting the session

8
Photo 5: The chat doesn’t know my name because the session has been deleted

backend/.env.example Outdated Show resolved Hide resolved
backend/.env.example Outdated Show resolved Hide resolved
@sergiy4 sergiy4 dismissed stale reviews from nikita-remeslov and Sanchousina via a1eeb57 August 28, 2024 10:30
ChatPath,
OpenAIRole,
} from '../../common/services/open-ai/libs/enums/enums.js';
import { type OpenAIService } from '../../common/services/open-ai/open-ai.service.js';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use relative imports

Sanchousina
Sanchousina previously approved these changes Aug 28, 2024
o-nedashkivska
o-nedashkivska previously approved these changes Aug 29, 2024
@sergiy4 sergiy4 dismissed stale reviews from o-nedashkivska and Sanchousina via dcb791f August 29, 2024 19:21
@o-nedashkivska o-nedashkivska mentioned this pull request Aug 30, 2024
3 tasks
@nikita-remeslov nikita-remeslov merged commit 03e2a6b into next Aug 30, 2024
2 checks passed
@nikita-remeslov nikita-remeslov deleted the task/OV-52-add-chat-history-saving branch August 30, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Backend feature
Projects
Status: To Be Tested
Development

Successfully merging this pull request may close these issues.

FEAT: Add chat history saving via sessions
5 participants