Skip to content

Commit

Permalink
feat: quivr core minimal chat (#2818)
Browse files Browse the repository at this point in the history
# Description
- Introduce `LLMEndpoint` class: wrapper around a `BaseChatLLM` to load
OpenAI compatible models
- Add `brain.search(...)` function to retrieve
- Test with test-coverage: 
- Added ability to load brain `from langchain.Document`
- Configured mypy and poetry lock in `.pre-commit.yaml`

# Test coverage

![image](https://github.com/QuivrHQ/quivr/assets/14312141/629ede66-146e-400f-b40b-8c22a9258a47)

---------

Co-authored-by: aminediro <aminedirhoussi@gmail.com>
  • Loading branch information
AmineDiro and aminediro committed Jul 9, 2024
1 parent f77c8e6 commit 481f24f
Show file tree
Hide file tree
Showing 13 changed files with 368 additions and 121 deletions.
16 changes: 16 additions & 0 deletions backend/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,19 @@ repos:
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
name: mypy
additional_dependencies: ["types-aiofiles"]

- repo: https://github.com/python-poetry/poetry
rev: "" # add version here
hooks:
- id: poetry-check
args: ["-C", "./backend/core"]
- id: poetry-lock
args: ["-C", "./backend/core"]
- id: poetry-install
args: ["-C", "./backend/core"]
72 changes: 53 additions & 19 deletions backend/core/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pytest-cov = "^5.0.0"
[tool.poetry.group.test.dependencies]
pytest-asyncio = "^0.23.7"
pytest = "^8.2.2"
pytest-xdist = "^3.6.1"


[tool.mypy]
Expand Down
Loading

0 comments on commit 481f24f

Please sign in to comment.