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

Bugfix/metadata description length #1150

Merged
merged 6 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions redbox-core/redbox/models/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ def merge_redbox_state_updates(current: RedboxState, update: RedboxState) -> Red


class GeneratedMetadata(BaseModel):
"""Document Metadata generated by ther LLM"""
"""Document Metadata generated by the LLM"""

name: str | None = Field(description="document name", default=None)
description: str | None = Field(description="document description", max_length=100, default=None)
description: str | None = Field(description="document description", default=None)
keywords: list[str] = Field(description="document keywords", max_length=5, default_factory=list)
6 changes: 3 additions & 3 deletions redbox-core/redbox/models/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class UploadedFileMetadata(ChunkMetadata):
"""

page_number: int | None = None
name: str
description: str
keywords: list[str]
name: str | None = None
description: str | None = None
keywords: list[str] | None = None
creator_type: ChunkCreatorType = ChunkCreatorType.user_uploaded_document
Loading