Skip to content

Commit

Permalink
refactor(memory): Rename store folder to chat_message_history (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz authored Aug 18, 2023
1 parent f87a738 commit fa54c7e
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 13 deletions.
1 change: 0 additions & 1 deletion packages/langchain/lib/src/memory/buffer_window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import '../model_io/chat_models/utils.dart';
import 'base.dart';
import 'chat.dart';
import 'models/models.dart';
import 'stores/message/in_memory.dart';

/// {@template conversation_buffer_window_memory}
/// Buffer for storing a conversation in-memory inside a limited size window
Expand Down
3 changes: 1 addition & 2 deletions packages/langchain/lib/src/memory/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import 'dart:async';
import '../model_io/chat_models/models/models.dart';
import '../utils/exception.dart';
import 'base.dart';
import 'chat_message_history/chat_message_history.dart';
import 'models/models.dart';
import 'stores/message/history.dart';
import 'stores/message/in_memory.dart';
import 'utils.dart';

/// {@template base_chat_memory}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../../../model_io/chat_models/models/models.dart';
import '../../model_io/chat_models/models/models.dart';

/// {@template base_chat_message_history}
/// Base interface for chat message history.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export 'base.dart';
export 'in_memory.dart';
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:collection';

import '../../../model_io/chat_models/chat_models.dart';
import 'history.dart';
import '../../model_io/chat_models/chat_models.dart';
import 'base.dart';

/// {@template chat_message_history}
/// A simple in-memory implementation of a chat message history.
Expand Down
2 changes: 1 addition & 1 deletion packages/langchain/lib/src/memory/memory.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export 'base.dart';
export 'buffer.dart';
export 'buffer_window.dart';
export 'chat.dart';
export 'chat_message_history/chat_message_history.dart';
export 'models/models.dart';
export 'simple.dart';
export 'stores/stores.dart';
export 'vector_store.dart';
1 change: 0 additions & 1 deletion packages/langchain/lib/src/memory/stores/stores.dart

This file was deleted.

3 changes: 1 addition & 2 deletions packages/langchain/lib/src/memory/summary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import '../model_io/language_models/language_models.dart';
import '../model_io/prompts/prompts.dart';
import 'base.dart';
import 'chat.dart';
import 'chat_message_history/chat_message_history.dart';
import 'models/models.dart';
import 'stores/message/history.dart';
import 'stores/message/in_memory.dart';

const _template = '''
Progressively summarize the lines of conversation provided, adding onto the previous summary returning a new summary.
Expand Down
1 change: 0 additions & 1 deletion packages/langchain/lib/src/memory/token_buffer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'base.dart';
import 'buffer_window.dart';
import 'chat.dart';
import 'models/models.dart';
import 'stores/message/in_memory.dart';

/// {@template conversation_token_buffer_memory}
/// Rolling buffer for storing a conversation and then retrieving the messages
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:langchain/src/memory/stores/stores.dart';
import 'package:langchain/src/model_io/chat_models/chat_models.dart';
import 'package:langchain/langchain.dart';
import 'package:test/test.dart';

void main() {
Expand Down

0 comments on commit fa54c7e

Please sign in to comment.