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

Refactor EntryConversation services to reduce code duplication #199

Open
davidzlu opened this issue Nov 23, 2024 · 0 comments
Open

Refactor EntryConversation services to reduce code duplication #199

davidzlu opened this issue Nov 23, 2024 · 0 comments
Labels
refactor Code refactoring

Comments

@davidzlu
Copy link
Collaborator

TODO: try to use _populateChatContent. Can't currently because this doesn't append; it modifies in place

createEntryConversation and updateEntryConversation have extremely similar code for calling an LLM and updating an EntryConversation document with the results. However, updateEntryConversation appends a new message to EntryConversation.messages, while createEntryConversation does not. This difference made it difficult to use the same helper function between the two.

Analyze the functions createEntryConversation and updateEntryConversation to see if it's possible to refactor them and reduce code duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code refactoring
Projects
None yet
Development

No branches or pull requests

1 participant