{"id":27063878,"url":"https://github.com/danielfleischer/haystack_opea","last_synced_at":"2025-04-05T16:35:22.420Z","repository":{"id":283289631,"uuid":"947308557","full_name":"danielfleischer/haystack_opea","owner":"danielfleischer","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-23T11:40:56.000Z","size":173,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T17:52:36.600Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielfleischer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-12T13:38:38.000Z","updated_at":"2025-03-20T10:07:05.000Z","dependencies_parsed_at":"2025-03-19T13:41:07.861Z","dependency_job_id":"d840520e-4afb-402c-b5db-ce9ca8724a0b","html_url":"https://github.com/danielfleischer/haystack_opea","commit_stats":null,"previous_names":["danielfleischer/haystack_opea"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfleischer%2Fhaystack_opea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfleischer%2Fhaystack_opea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfleischer%2Fhaystack_opea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfleischer%2Fhaystack_opea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielfleischer","download_url":"https://codeload.github.com/danielfleischer/haystack_opea/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247368735,"owners_count":20927913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-05T16:35:21.832Z","updated_at":"2025-04-05T16:35:22.405Z","avatar_url":"https://github.com/danielfleischer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haystack-OPEA\n\nThis package contains the Haystack integrations for OPEA Compatible [OPEA](https://opea.dev/) Microservices.\n\n## Installation\n\nYou can install Haystack OPEA package in several ways:\n\n### Install from Source\n\nTo install the package from the source, run:\n\n```bash\npip install poetry \u0026\u0026 poetry install --with test\n```\n\n### Install from Wheel Package\n\nTo install the package from a pre-built wheel, run:\n\n1. **Build the Wheels**: Ensure the wheels are built using Poetry.\n    ```bash\n    poetry build\n    ```\n2. **Install via Wheel File**: Install the package using the generated wheel file.\n    ```bash\n    pip install dist/haystack_opea-0.1.0-py3-none-any.whl\n    ```\n\n## Embeddings\n\nThe classes `OPEADocumentEmbedder` and `OPEATextEmbedder` are introduced.\n\n```python\nfrom haystack_opea.embedders.tei import OPEATextEmbedder\n\ntext_to_embed = \"I love pizza!\"\n\ntext_embedder = OPEATextEmbedder(api_url=\"http://localhost:6006\")\ntext_embedder.warm_up()\n\nprint(text_embedder.run(text_to_embed)\n```\n\nAnd similarly:\n\n```python\nfrom haystack import Document\nfrom haystack_opea.embedders.tei import OPEADocumentEmbedder\n\ndoc = Document(content=\"I love pizza!\")\n\ndocument_embedder = OPEADocumentEmbedder(api_url=\"http://localhost:6006\")\ndocument_embedder.warm_up()\n\nresult = document_embedder.run([doc])\nprint(result[\"documents\"][0].embedding)\n```\n\n## LLMs\n\nThe class `OPEAGenerator` is introduced:\n\n```python\nfrom haystack_opea.generators import OPEAGenerator\n\ngenerator = OPEAGenerator(\n    \"http://localhost:9009\",\n    model_arguments={\n        \"temperature\": 0.2,\n        \"top_p\": 0.7,\n        \"max_tokens\": 1024,\n    },\n)\ngenerator.warm_up()\nresult = generator.run(prompt=\"What is the answer?\")\n```\n\nFor more information, see [Haystack Docs](https://docs.haystack.deepset.ai/docs/intro) and [OPEA](https://opea.dev).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielfleischer%2Fhaystack_opea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielfleischer%2Fhaystack_opea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielfleischer%2Fhaystack_opea/lists"}