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

propagate RAG changes #165

Merged
merged 1 commit into from
Feb 16, 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
1 change: 1 addition & 0 deletions deepsearch/cps/apis/public/__init__.py

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

1 change: 1 addition & 0 deletions deepsearch/cps/apis/public/models/__init__.py

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

121 changes: 121 additions & 0 deletions deepsearch/cps/apis/public/models/semantic_ingest_req_params.py

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

29 changes: 28 additions & 1 deletion deepsearch/cps/apis/public/models/semantic_ingest_request.py

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

13 changes: 11 additions & 2 deletions deepsearch/cps/client/components/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
from typing_extensions import Annotated

from deepsearch.cps.apis import public as sw_client
from deepsearch.cps.apis.public.models.semantic_ingest_req_params import (
SemanticIngestReqParams,
)
from deepsearch.cps.apis.public.models.semantic_ingest_request import (
SemanticIngestRequest,
)
Expand Down Expand Up @@ -89,6 +92,7 @@ def semantic_ingest(
self,
project: Union[Project, str],
data_source: SemIngestSource,
skip_ingested_docs: bool = True,
) -> Task:

proj_key = project.key if isinstance(project, Project) else project
Expand All @@ -112,10 +116,15 @@ def semantic_ingest(
)
else:
raise RuntimeError("Unknown data source format for ingest_for_qa")

req_params = SemanticIngestReqParams(
skip_ingested_docs=skip_ingested_docs,
)
task: Task = self.semantic_api.ingest(
proj_key=proj_key,
body=SemanticIngestRequest(source=api_src_data.dict()),
body=SemanticIngestRequest(
source=api_src_data.dict(),
parameters=req_params.to_dict(),
),
)

return task
Expand Down
Loading
Loading