{"id":19287899,"url":"https://github.com/deeppavlov/deeppavlov_dreamtools","last_synced_at":"2026-06-12T22:31:56.690Z","repository":{"id":55874706,"uuid":"485337435","full_name":"deeppavlov/deeppavlov_dreamtools","owner":"deeppavlov","description":"Development Tools for DeepPavlov Dream","archived":false,"fork":false,"pushed_at":"2024-02-08T10:43:54.000Z","size":455,"stargazers_count":2,"open_issues_count":4,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-11-15T01:04:16.044Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/deeppavlov.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":"2022-04-25T11:11:07.000Z","updated_at":"2023-02-06T08:49:03.000Z","dependencies_parsed_at":"2024-02-01T01:23:58.294Z","dependency_job_id":"6b45a8d0-d99a-4b67-94d5-e125365da8a9","html_url":"https://github.com/deeppavlov/deeppavlov_dreamtools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deeppavlov/deeppavlov_dreamtools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fdeeppavlov_dreamtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fdeeppavlov_dreamtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fdeeppavlov_dreamtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fdeeppavlov_dreamtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deeppavlov","download_url":"https://codeload.github.com/deeppavlov/deeppavlov_dreamtools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fdeeppavlov_dreamtools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34265491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-11-09T22:07:33.342Z","updated_at":"2026-06-12T22:31:56.673Z","avatar_url":"https://github.com/deeppavlov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![coverage-badge](report/coverage.svg)\n# Overview\ndreamtools is a package exposes high-level API for creating and editing Dream configuration files as well as a CLI interface.\n\n# Installation\nInstall from GitHub\n```\npip install git+https://github.com/deeppavlov/deeppavlov_dreamtools.git --force-reinstall\n```\n\nor install in editable mode from cloned repo locally (useful for development purposes)\n```\npip install -e .\n```\n\n\n# Package API\nThere are 4 main objects which represent Dream configurations:\n- [AssistantDist](#AssistantDist)\n- [Pipeline](#Pipeline)\n- [DreamComponent](#DreamComponent)\n- [DreamService](#DreamService)\n\n## Usage\n\n### Quickstart\n```python\nfrom deeppavlov_dreamtools import AssistantDist, Pipeline, DreamComponent, DreamService\n\n\ndist = AssistantDist.from_name(\"ai_faq_assistant\", dream_root=\"/home/username/projects/dream\")\n\nnew_dist = dist.clone(\n    name=\"cloned_dist\",\n    display_name=\"Cloned AI FAQ Assistant\",\n    author=\"me@email.org\",\n    description=\"Yet another cloned assistant\",\n)\n\n# common methods\n\n# add component to distribution\ncomponent = DreamComponent.from_file(\"components/pGxj32ic41pvquRXUdqc7A.yml\", dream_root=\"/home/username/projects/dream\")\nnew_dist.add_component()\n\n# save and generate new configs which include the annotator \"spelling_preprocessing\" added earlier\nnew_dist.save(overwrite=True, generate_configs=True)\n# or generate configs separately\nnew_dist.generate_pipeline_conf()\nnew_dist.generate_compose()\n\n# remove previously added component\nnew_dist.remove_component(\"annotators\", \"spelling_preprocessing\")\nnew_dist.save(overwrite=True, generate_configs=True)\n```\n### AssistantDist\nRepresents distribution object.\nYou can either load it from classmethods `from_name`, `from_dist`\nor initialize it directly passing underlying objects [see initializing from scratch](#Initializing-objects-from-scratch)\n\nIn dream repository, distributions are found inside [assistant_dists](https://github.com/deeppavlov/dream/tree/main/assistant_dists)\n\n```python\nfrom deeppavlov_dreamtools import AssistantDist\n\ndist = AssistantDist.from_name(\"ai_faq_assistant\", dream_root=\"/home/username/projects/dream\")\n```\n\n### Pipeline\nRepresents pipeline object.\nYou can either load it from classmethod `from_name`\nor initialize it directly passing underlying objects [see initializing from scratch](#Initializing-objects-from-scratch)\n\nIn dream repository, Pipelines are found inside [assistant_dists/{dist_name}](https://github.com/deeppavlov/dream/tree/main/assistant_dists/ai_faq_assistant/pipeline_conf.json)\n```python\nfrom deeppavlov_dreamtools import Pipeline\n\npipeline = Pipeline.from_name(\"ai_faq_assistant\", dream_root=\"/home/username/projects/dream\")\n```\n\n### DreamComponent\nRepresents component object. Component is a part of Pipeline which describes how to interact with a service. It is represented by a YML file that looks like this:\n\n\u003cdetails\u003e\n    \u003csummary\u003eExample Component File\u003c/summary\u003e\n    \n    name: entity_detection\n    display_name: Entity Detection\n    component_type: null\n    model_type: NN-based\n    is_customizable: false\n    author: publisher@deeppavlov.ai\n    description: extracts entities and their types from utterances\n    ram_usage: 5.5G\n    gpu_usage: null\n    group: annotators\n    connector:\n      protocol: http\n      timeout: 1.0\n      url: http://entity-detection-ru:8103/respond\n    dialog_formatter: state_formatters.dp_formatters:entity_detection_formatter_dialog\n    response_formatter: state_formatters.dp_formatters:simple_formatter_service\n    previous_services:\n    - annotators.spelling_preprocessing\n    - annotators.sentseg\n    required_previous_services: null\n    state_manager_method: add_annotation\n    tags: null\n    endpoint: respond\n    service: annotators/entity_detection_rus/service_configs/entity-detection-ru\n    date_created: '2023-03-16T09:45:32'\n    \n\u003c/details\u003e\n\nYou can load it from classmethod `from_file`\n\nIn dream repository, Components are found inside [components](https://github.com/deeppavlov/dream/tree/main/components)\n```python\nfrom deeppavlov_dreamtools import DreamComponent\n\ncomponent = DreamComponent.from_file(\"components/1Q9QXih1U2zhCpVm9zxdsA.yml\", dream_root=\"/home/username/projects/dream\")\n```\n\n\n### DreamService\nRepresents service object. Service is a part of Component which describes how to deploy a service.\nMultiple components can use a single service.\nYou can load it from classmethods `from_config_dir`, `from_source_dir`\n\nIn dream repository, Services are found inside [{service_group}/{service_name}/service_configs/{config_name}](https://github.com/deeppavlov/dream/tree/main/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-prompted-skill)\n```python\nfrom deeppavlov_dreamtools import DreamService\n\ncomponent = DreamService.from_config_dir(path=\"annotators/SentSeg/service_configs/sentseg\", dream_root=\"/home/username/projects/dream\")\n```\n\n\n### Initializing objects from scratch\n```python\nfrom deeppavlov_dreamtools import AssistantDist, Pipeline, DreamComponent, DreamService\nfrom deeppavlov_dreamtools.distconfigs.generics import PipelineConfMetadata\n\n\ndist = AssistantDist(\n    dist_path=\"/home/username/projects/dream/assistant_dists/ai_faq_assistant\",\n    name=\"ai_faq_assistant\",\n    dream_root=\"/home/username/projects/dream\",\n    pipeline=Pipeline(\n        config=None,\n        metadata=PipelineConfMetadata(\n            display_name=\"AI FAQ Assistant\",\n            author=\"me@email.org\",\n            description=\"Answers FAQ Questions\",\n        ),\n        annotators={\n            \"sentseg\": DreamComponent.from_file(\"components/gM4fEjvVqLlSRRRkQfds2g.yml\", \"/home/username/projects/dream\"),\n            \"prompt_goals_collector\": DreamComponent.from_file(\"components/fOud1KbT6qhY.yml\", \"/home/username/projects/dream\"),\n            \"prompt_selector\": DreamComponent.from_file(\"components/fOud1KbT6qhY.yml\", \"/home/username/projects/dream\"),\n        },\n        skills={\n            \"dff_ai_faq_prompted_skill\": DreamComponent.from_file(\"components/sQjaqWKJjVWjVEIbNuA.yml\", \"/home/username/projects/dream\"),\n            \"dummy_skill\": DreamComponent.from_file(\"components/uYkoK0vRp4bbIg9akI1yw.yml\", \"/home/username/projects/dream\"),\n        },\n        response_selectors={\n            \"response_selector\": DreamComponent.from_file(\"components/YJzc7NwGrLmKp6gfZJh7X1.yml\", \"/home/username/projects/dream\")\n        },\n        last_chance_service=DreamComponent.from_file(\"components/70NLr5qqOow5.yml\", \"/home/username/projects/dream\"),\n        timeout_service=DreamComponent.from_file(\"components/x8rLTpIWct4P.yml\", \"/home/username/projects/dream\"),\n        response_annotators={\n            \"sentseg\": DreamComponent.from_file(\"components/1Q9QXih1U2zhCpVm9zxdsA.yml\", \"/home/username/projects/dream\"),\n        },\n        response_annotator_selectors=DreamComponent.from_file(\"components/LXrJDIf43gwNmPMNXG5Eg.yml\", \"/home/username/projects/dream\"),\n        candidate_annotators={\n            \"combined_classification\": DreamComponent.from_file(\"components/PbLNvh4hrvs47rPaf2bfYQ.yml\", \"/home/username/projects/dream\"),\n            \"sentence_ranker\": DreamComponent.from_file(\"components/XGwmAHtAOu0NDqqG3QCJw.yml\", \"/home/username/projects/dream\"),\n        },\n        skill_selectors={\n            \"description_based_skill_selector\": DreamComponent.from_file(\"components/dfsw4bji8bgjq2.yml\", \"/home/username/projects/dream\"),\n        },\n        services={https://github.com/deeppavlov/deeppavlov_dreamtools/blob/fix/cli-actions/README.md\n            \"transformers_lm_oasst12b\": DreamComponent.from_file(\"component/sdkajfhsidhf8wfjh2ornfkle.yml\", \"/home/username/projects/dream\")\n        },\n    ),\n)\n\n# save and generate configs\ndist.save(overwrite=True, generate_configs=True)\n```\n\n# Command Line Interface\ndreamtools support a number of commands to ease Dream development.\nYou can always refer to\n`dreamtools {command} --help`\nor\n`dreamtools {command} {subcommand} --help`\nto see available arguments.\n\n- [dreamtools](#dreamtools)\n  - new\n    - [dist](#dreamtools-new-dist)\n  - clone\n    - [dist](#dreamtools-clone-dist)\n  - add\n    - [component](#dreamtools-add-component)\n\n# dreamtools\nAll CLI commands start with the main command `dreamtools`.\nYou can either call it from inside the cloned Dream directory or provide it as an argument:\n\n```\ndreamtools -D home/username/projects/dream {command} {subcommand} ...\n```\n\n### dreamtools new dist\nCreate new Dream distribution\n\n```\ndreamtools new dist my_assistant \\\n  --display-name \"My Assistant\" \\\n  --author myemail@email.org \\\n  --description \"My custom Distribution\" \\\n  --annotators components/1Q9QXih1U2zhCpVm9zxdsA.yml \\\n  --annotators components/dflkgjdlkh342r9ndf.yml \\\n  --annotators components/tgzaSQggV7wgMprOmF1Ww.yml \\\n  --annotators components/M1sE6hOm20EGBWBdr0vIOw.yml \\\n  --annotators components/O4FVnkAwjay1mL1FbuRGWw.yml \\\n  --skills components/4yA8wZWOEnafRfz6Po9nvA.yml \\\n  --skills components/qx0j5QHAzog0b39nRnuA.yml \\\n  --skills components/ckUclxqUplyzwmnYyixEw.yml \\\n  --skills components/uYkoK0vRp4bbIg9akI1yw.yml \\\n  --response-annotators components/dflkgjdlkh342r9ndf.yml \\\n  --response-annotators components/05PqJXVd7gV7DqslN5z3A.yml \\\n  --last-chance-service components/70NLr5qqOow5.yml \\\n  --timeout-service components/x8rLTpIWct4P.yml \\\n  --response-annotator-selectors components/LXrJDIf43gwNmPMNXG5Eg.yml \\\n  --skill-selectors components/xSwFvtAUdvtQosvzpb7oMg.yml \\\n  --response-selectors components/KX4drAocVa5APcivWHeBNQ.yml \\\n  --overwrite\n```\n\n\n### dreamtools clone dist\nClone existing (--template argument) distribution\n\n```\ndreamtools clone dist dream_adventurer_openai_prompted \\\n--template dream_persona_openai_prompted \\\n--display-name \"Dream Adventurer\" \\\n--author deepypavlova@email.org \\\n--description \"This is a simple dialog system that can chat with you on any topic. It has a pre-defined personality and uses OpenAI ChatGPT model to generate responses.\" \\\n--overwrite\n```\n\n\n### dreamtools add component\nAdd component from component card to distribution\n\n```\ndreamtools add component components/jkdhfgkhgodfiugpojwrnkjnlg.yml --dist dream_persona_openai_prompted\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeppavlov%2Fdeeppavlov_dreamtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeppavlov%2Fdeeppavlov_dreamtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeppavlov%2Fdeeppavlov_dreamtools/lists"}