Skip to content

Commit

Permalink
chore: Redefine TextQuery as BaseModel with coerce
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Nov 5, 2024
1 parent fb16594 commit ff30ee1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion argilla-server/.env.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ALEMBIC_CONFIG=src/argilla_server/alembic.ini
ARGILLA_DATABASE_URL=sqlite+aiosqlite:///${HOME}/.argilla/argilla.db?check_same_thread=False
ARGILLA_DATABASE_URL=sqlite+aiosqlite:///${HOME}/.argilla/argilla.dev.db?check_same_thread=False
5 changes: 3 additions & 2 deletions argilla-server/src/argilla_server/search_engine/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,12 @@ class Order:
order: SortOrder


@dataclasses.dataclass
class TextQuery:
class TextQuery(BaseModel):
q: str
field: Optional[str] = None

model_config = ConfigDict(coerce_numbers_to_str=True)


class UserResponseStatusFilter(BaseModel):
statuses: List[ResponseStatusFilter]
Expand Down

0 comments on commit ff30ee1

Please sign in to comment.