diff --git a/examples/pipelines/adaptive-rag/app.py b/examples/pipelines/adaptive-rag/app.py index 1a4599a..8e27a46 100644 --- a/examples/pipelines/adaptive-rag/app.py +++ b/examples/pipelines/adaptive-rag/app.py @@ -26,16 +26,12 @@ class App(BaseModel): port: int = 8000 with_cache: bool = True - cache_backend: InstanceOf[pw.persistence.Backend] = ( - pw.persistence.Backend.filesystem("./Cache") - ) terminate_on_error: bool = False def run(self) -> None: server = QASummaryRestServer(self.host, self.port, self.question_answerer) server.run( with_cache=self.with_cache, - cache_backend=self.cache_backend, terminate_on_error=self.terminate_on_error, ) diff --git a/examples/pipelines/adaptive-rag/app.yaml b/examples/pipelines/adaptive-rag/app.yaml index 3380770..abb713b 100644 --- a/examples/pipelines/adaptive-rag/app.yaml +++ b/examples/pipelines/adaptive-rag/app.yaml @@ -69,8 +69,6 @@ question_answerer: !pw.xpacks.llm.question_answering.AdaptiveRAGQuestionAnswerer # Cache configuration # with_cache: true -# cache_backend: !pw.persistence.Backend.filesystem -# path: ".Cache" # Set `terminate_on_error` to true if you want the program to terminate whenever any error is encountered # terminate_on_error: false diff --git a/examples/pipelines/demo-document-indexing/app.py b/examples/pipelines/demo-document-indexing/app.py index 70ca7a0..c3547e0 100644 --- a/examples/pipelines/demo-document-indexing/app.py +++ b/examples/pipelines/demo-document-indexing/app.py @@ -26,16 +26,12 @@ class App(BaseModel): port: int = 8000 with_cache: bool = True - cache_backend: InstanceOf[pw.persistence.Backend] = ( - pw.persistence.Backend.filesystem("./Cache") - ) terminate_on_error: bool = False def run(self) -> None: server = DocumentStoreServer(self.host, self.port, self.document_store) server.run( with_cache=self.with_cache, - cache_backend=self.cache_backend, terminate_on_error=self.terminate_on_error, ) diff --git a/examples/pipelines/demo-document-indexing/app.yaml b/examples/pipelines/demo-document-indexing/app.yaml index 3ac1ba3..17f6816 100644 --- a/examples/pipelines/demo-document-indexing/app.yaml +++ b/examples/pipelines/demo-document-indexing/app.yaml @@ -56,8 +56,6 @@ document_store: !pw.xpacks.llm.document_store.DocumentStore # Cache configuration # with_cache: true -# cache_backend: !pw.persistence.Backend.filesystem -# path: ".Cache" # Set `terminate_on_error` to true if you want the program to terminate whenever any error is encountered # terminate_on_error: false diff --git a/examples/pipelines/demo-question-answering/.env b/examples/pipelines/demo-question-answering/.env deleted file mode 100644 index 1205005..0000000 --- a/examples/pipelines/demo-question-answering/.env +++ /dev/null @@ -1 +0,0 @@ -OPENAI_API_KEY=sk-*** diff --git a/examples/pipelines/demo-question-answering/app.py b/examples/pipelines/demo-question-answering/app.py index 1a4599a..8e27a46 100644 --- a/examples/pipelines/demo-question-answering/app.py +++ b/examples/pipelines/demo-question-answering/app.py @@ -26,16 +26,12 @@ class App(BaseModel): port: int = 8000 with_cache: bool = True - cache_backend: InstanceOf[pw.persistence.Backend] = ( - pw.persistence.Backend.filesystem("./Cache") - ) terminate_on_error: bool = False def run(self) -> None: server = QASummaryRestServer(self.host, self.port, self.question_answerer) server.run( with_cache=self.with_cache, - cache_backend=self.cache_backend, terminate_on_error=self.terminate_on_error, ) diff --git a/examples/pipelines/demo-question-answering/app.yaml b/examples/pipelines/demo-question-answering/app.yaml index 5cbe8a2..39fb915 100644 --- a/examples/pipelines/demo-question-answering/app.yaml +++ b/examples/pipelines/demo-question-answering/app.yaml @@ -65,8 +65,6 @@ question_answerer: !pw.xpacks.llm.question_answering.BaseRAGQuestionAnswerer # Cache configuration # with_cache: true -# cache_backend: !pw.persistence.Backend.filesystem -# path: ".Cache" # Set `terminate_on_error` to true if you want the program to terminate whenever any error is encountered # terminate_on_error: false diff --git a/examples/pipelines/gpt_4o_multimodal_rag/app.py b/examples/pipelines/gpt_4o_multimodal_rag/app.py index 3550c8c..0433d21 100644 --- a/examples/pipelines/gpt_4o_multimodal_rag/app.py +++ b/examples/pipelines/gpt_4o_multimodal_rag/app.py @@ -36,16 +36,12 @@ class App(BaseModel): port: int = 8000 with_cache: bool = True - cache_backend: InstanceOf[pw.persistence.Backend] = ( - pw.persistence.Backend.filesystem("./Cache") - ) terminate_on_error: bool = False def run(self) -> None: server = QASummaryRestServer(self.host, self.port, self.question_answerer) server.run( with_cache=self.with_cache, - cache_backend=self.cache_backend, terminate_on_error=self.terminate_on_error, ) diff --git a/examples/pipelines/gpt_4o_multimodal_rag/app.yaml b/examples/pipelines/gpt_4o_multimodal_rag/app.yaml index a00f1c5..da579dc 100644 --- a/examples/pipelines/gpt_4o_multimodal_rag/app.yaml +++ b/examples/pipelines/gpt_4o_multimodal_rag/app.yaml @@ -77,8 +77,6 @@ question_answerer: !pw.xpacks.llm.question_answering.BaseRAGQuestionAnswerer # Cache configuration # with_cache: true -# cache_backend: !pw.persistence.Backend.filesystem -# path: ".Cache" # Set `terminate_on_error` to true if you want the program to terminate whenever any error is encountered # terminate_on_error: false diff --git a/examples/pipelines/private-rag/app.py b/examples/pipelines/private-rag/app.py index 1a4599a..8e27a46 100644 --- a/examples/pipelines/private-rag/app.py +++ b/examples/pipelines/private-rag/app.py @@ -26,16 +26,12 @@ class App(BaseModel): port: int = 8000 with_cache: bool = True - cache_backend: InstanceOf[pw.persistence.Backend] = ( - pw.persistence.Backend.filesystem("./Cache") - ) terminate_on_error: bool = False def run(self) -> None: server = QASummaryRestServer(self.host, self.port, self.question_answerer) server.run( with_cache=self.with_cache, - cache_backend=self.cache_backend, terminate_on_error=self.terminate_on_error, ) diff --git a/examples/pipelines/private-rag/app.yaml b/examples/pipelines/private-rag/app.yaml index 8cf856a..d664e0b 100644 --- a/examples/pipelines/private-rag/app.yaml +++ b/examples/pipelines/private-rag/app.yaml @@ -76,8 +76,6 @@ question_answerer: !pw.xpacks.llm.question_answering.AdaptiveRAGQuestionAnswerer # Cache configuration # with_cache: true -# cache_backend: !pw.persistence.Backend.filesystem -# path: ".Cache" # Set `terminate_on_error` to true if you want the program to terminate whenever any error is encountered # terminate_on_error: false diff --git a/examples/pipelines/slides_ai_search/app.py b/examples/pipelines/slides_ai_search/app.py index f29bd64..b23460c 100755 --- a/examples/pipelines/slides_ai_search/app.py +++ b/examples/pipelines/slides_ai_search/app.py @@ -13,6 +13,11 @@ from pathway_slides_ai_search import CustomDeckRetriever, add_slide_id, get_model from pydantic import BaseModel, ConfigDict, FilePath, InstanceOf +# To use advanced features with Pathway Scale, get your free license key from +# https://pathway.com/features and paste it below. +# To use Pathway Community, comment out the line below. +pw.set_license_key("demo-license-key-with-telemetry") + class App(BaseModel): host: str = "0.0.0.0" @@ -28,9 +33,6 @@ class App(BaseModel): details_schema: FilePath | dict[str, Any] | None = None with_cache: bool = True - cache_backend: InstanceOf[pw.persistence.Backend] = ( - pw.persistence.Backend.filesystem("./Cache") - ) terminate_on_error: bool = False def run(self) -> None: @@ -64,7 +66,6 @@ def run(self) -> None: app.run_server( with_cache=self.with_cache, - cache_backend=self.cache_backend, terminate_on_error=self.terminate_on_error, ) diff --git a/examples/pipelines/slides_ai_search/app.yaml b/examples/pipelines/slides_ai_search/app.yaml index 83d946a..2569d20 100644 --- a/examples/pipelines/slides_ai_search/app.yaml +++ b/examples/pipelines/slides_ai_search/app.yaml @@ -78,8 +78,6 @@ details_schema: # Cache configuration # with_cache: true -# cache_backend: !pw.persistence.Backend.filesystem -# path: ".Cache" # Set `terminate_on_error` to true if you want the program to terminate whenever any error is encountered # terminate_on_error: false