-
Notifications
You must be signed in to change notification settings - Fork 71
Document high-level ingestion methods #261
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,7 +20,7 @@ class ConversationMessage( | |||||||||||||
| text_chunks: list[str], # Text of the message, 1 or more chunks | ||||||||||||||
| tags: list[str] = [], # Optional tags | ||||||||||||||
| timestamp: str | None = None, # ISO timestamp in UTC with 'z' suffix | ||||||||||||||
| metadata: ConversationMessageMeta, # See below | ||||||||||||||
| metadata: ConversationMessageMeta, # See below | ||||||||||||||
| ) | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -64,7 +64,32 @@ extracted and indexed knowledge thereof. | |||||||||||||
| It is constructed by calling the factory function | ||||||||||||||
| `typeagent.create_conversation` described below. | ||||||||||||||
|
|
||||||||||||||
| It has one public method: | ||||||||||||||
| It has these public methods: | ||||||||||||||
|
||||||||||||||
| It has these public methods: | |
| Some of its public methods are: |
Copilot
AI
Apr 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add_messages_with_indexing is documented as “all-or-nothing” for SQLite, but the implementation explicitly notes that in-memory storage has no rollback support and partial changes may remain on error. Consider adding a brief note about the in-memory behavior here so callers don’t assume transactional semantics when dbname=None.
| For SQLite storage this is all-or-nothing. | |
| For SQLite storage this is all-or-nothing. When using in-memory | |
| storage (`dbname=None`), rollback is not supported, so partial | |
| changes may remain if an error occurs. |
Copilot
AI
Apr 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add_messages_streaming also performs source-id based skipping (already-ingested messages are silently skipped when source_id is set). This affects messages_added vs. the number of streamed messages; consider documenting this behavior since it’s an important semantic difference from naive “stream + commit” ingestion.
| Useful for very large ingestions where one large transaction is impractical. | |
| Useful for very large ingestions where one large transaction is impractical. | |
| When source-id based deduplication is enabled, messages that were already | |
| ingested may be silently skipped during streaming. As a result, | |
| `AddMessagesResult.messages_added` may be smaller than the total number of | |
| messages yielded by the async iterable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs say the
timestampuses a UTC'z'suffix (lowercase), but the implementation uses an explicit'Z'suffix (uppercase) for UTC (seeformat_timestamp_utcandConversationMessage.timestampdocs). This example format should be updated to avoid generating/accepting the wrong timestamp format.