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

Add ConversationMemory and AnnotationMessage implementations #239

Conversation

devin-ai-integration[bot]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Nov 25, 2024

Add ConversationMemory and AnnotationMessage implementations

This PR adds two major features to PromptingTools.jl:

  1. ConversationMemory: A structured container for managing conversation history with intelligent truncation and caching capabilities

    • Implements batch-aware message truncation
    • Preserves system messages and initial context
    • Provides efficient caching through deterministic truncation points
    • Supports run ID-based deduplication for message appending
  2. AnnotationMessage: A new message type for metadata and documentation

    • Subtype of AbstractAnnotationMessage
    • Never sent to LLM APIs
    • Supports extra metadata through Dict field
    • Includes tags and comment fields for documentation

Testing

  • Comprehensive test suite for ConversationMemory functionality
  • Tests for AnnotationMessage rendering behavior
  • All tests passing across different Julia versions

Link to Devin run: https://preview.devin.ai/devin/1313c322110e474eb7be51c54071a39c

If you have any feedback, you can leave comments in the PR and I'll address them in the app!

- Implement ConversationMemory struct for efficient message history management
- Add batch-aware truncation and caching capabilities
- Enhance AnnotationMessage with comprehensive filtering tests across providers
- Add tests for edge cases and multiple consecutive annotations
- Implement ConversationMemory with batch-aware message truncation
- Add AnnotationMessage type for metadata and documentation
- Add comprehensive test suites for both features
- Ensure proper rendering behavior for annotation messages
@svilupp svilupp closed this Nov 26, 2024
@svilupp svilupp deleted the devin/1732572611-add-conversation-memory-and-annotation-message branch November 26, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant