Skip to content

Commit

Permalink
Include compose.full_with_replicas (#1707)
Browse files Browse the repository at this point in the history
  • Loading branch information
NolanTrem authored Dec 17, 2024
1 parent a7c58fa commit b669ec4
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/r2r-light-py-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Poppler
run: |
sudo apt-get update
Expand Down
1 change: 0 additions & 1 deletion py/core/database/chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ async def semantic_search(
LIMIT ${len(params) + 3}
"""

print("query = ", query)
params.extend(
[
extended_limit, # First stage limit
Expand Down
1 change: 0 additions & 1 deletion py/core/database/conversations.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ async def get_conversation(
msg_query, [conversation_id]
)

print("results = ", results)
return [
MessageResponse(
id=str(row["id"]),
Expand Down
4 changes: 0 additions & 4 deletions py/core/main/api/v3/retrieval_router.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import asyncio
import textwrap
from copy import copy
from typing import Any, Optional
from uuid import UUID

Expand Down Expand Up @@ -258,11 +256,9 @@ async def search_app(
"""
if query == "":
raise R2RException("Query cannot be empty", 400)
print("search_settings = ", search_settings)
effective_settings = self._prepare_search_settings(
auth_user, search_mode, search_settings
)
print("effective_settings = ", effective_settings)
results = await self.services.retrieval.search(
query=query,
search_settings=effective_settings,
Expand Down
3 changes: 0 additions & 3 deletions py/core/main/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,7 @@ def __init__(self, config_data: dict[str, Any]):
self.completion = CompletionConfig.create(**self.completion, app=self.app) # type: ignore
self.crypto = CryptoConfig.create(**self.crypto, app=self.app) # type: ignore
self.email = EmailConfig.create(**self.email, app=self.app) # type: ignore
print("self.database raw = ", self.database)
self.database = DatabaseConfig.create(**self.database, app=self.app) # type: ignore

print("self.database = ", self.database)
self.embedding = EmbeddingConfig.create(**self.embedding, app=self.app) # type: ignore
self.ingestion = IngestionConfig.create(**self.ingestion, app=self.app) # type: ignore
self.agent = AgentConfig.create(**self.agent, app=self.app) # type: ignore
Expand Down
8 changes: 6 additions & 2 deletions py/core/main/services/auth_service.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
from datetime import datetime
from typing import Optional
from uuid import UUID
Expand All @@ -11,6 +12,8 @@
from ..config import R2RConfig
from .base import Service

logger = logging.getLogger()


class AuthService(Service):
def __init__(
Expand Down Expand Up @@ -190,8 +193,9 @@ async def delete_user(
collection_id=collection_id,
)
except Exception as e:
# print(f"Error deleting graph for collection {collection_id}: {e}")
pass
logger.warning(
f"Error deleting graph for collection {collection_id}: {e}"
)

if delete_vector_data:
await self.providers.database.chunks_handler.delete_user_vector(
Expand Down
Empty file.
11 changes: 9 additions & 2 deletions py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "r2r"
readme = "README.md"
version = "3.3.15"
version = "3.3.16"

description = "SciPhi R2R"
authors = ["Owen Colegrove <owen@sciphi.ai>"]
license = "MIT"
include = ["r2r.toml", "compose.yaml", "compose.full.yaml", "pyproject.toml", "migrations/**/*" ]
include = [
"r2r.toml",
"compose.yaml",
"compose.full.yaml",
"compose.full_with_replicas",
"pyproject.toml",
"migrations/**/*"
]
packages = [
{ include = "r2r" },
{ include = "sdk", from = "." },
Expand Down
1 change: 0 additions & 1 deletion py/tests/integration/test_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ def test_list_documents_with_pagination(mutable_client):
mutable_client.users.register(temp_user, "password")
mutable_client.users.login(temp_user, "password")


doc_ids = []
for i in range(3):
resp = mutable_client.documents.create(
Expand Down
2 changes: 1 addition & 1 deletion py/tests/integration/test_retrieval_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def test_agent_clarification_requests(client):
message=msg,
search_settings={"use_semantic_search": True},
)
print('resp = ', resp)
print("resp = ", resp)
content = resp["results"]["messages"][-1]["content"]
assert any(
phrase in content.lower()
Expand Down

0 comments on commit b669ec4

Please sign in to comment.