kadia


Namekadia JSON
Version 1.0.10 PyPI version JSON
download
home_page
Summary
upload_time2023-12-18 11:10:31
maintainer
docs_urlNone
authorPasha Podolsky
requires_python>=3.9,<3.13
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Kadia AI

Kadia AI integrates several strategies to use AI for facilitating navigation through science. Shortly, Kadia accept your query, retrieve scholarly publications and books from STC and answer your query using AI and collected documents.

More technical description:
- IPFS is utilized to access the Standard Template Construct (STC).
- STC provides the raw documents for Kadia.
- Embedding Model constructs embeddings for these documents and Kadia stores these embeddings in the vector database.
- These embeddings are then used to retrieve relevant documents, and then they are sent to LLM for Q&A and summarization.

## Install

You should have [installed IPFS](https://libstc.cc/#/help/install-ipfs)

Then, you should install `kadia-ai` package
```bash
pasha@kadia:~ pip install kadia-ai
```

and launch qdrant database for storing vectors:

```bash
pasha@kadia:~ docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
```

Upon its initial launch, `kadia` will create a `~/.kadia` directory containing a `config.yaml` file.
You can edit the config file to point to different IPFS addresses.

## Usage

**Attention!** STC does not contain every book or publication in the world. We are constantly increasing coverage but there is still a lot to do.
STC contains metadata for the most of the items, but `links` or `content` fields may be absent.

```console
# (Optional) Launch Summa search engine, then you will not have to wait bootstrapping every time.
# It will take a time! Wait until the text `Serving on ...` appears
# If you decided to launch it, switch to another Terminal window
pasha@kadia:~ geck --ipfs-http-base-url 127.0.0.1:8080 - serve
```

Now we should initialize Kadia and choose which models will be used:

```console
pasha@kadia:~ kadia - write-config --force
# or if you want to use OpenAI model, export keys and you should set appropriate models in config:
pasha@kadia:~ export OPENAI_API_KEY=...
pasha@kadia:~ kadia - write-config -l openai --force
# or if you want to use GPU:
pasha@kadia:~ kadia - write-config --device cuda --force

# Summarize a document
pasha@kadia:~ kadia - sum-doc doi:10.1155/2022/7138756

Document: doi:10.1155/2022/7138756
Summarization: Resveratrol is a natural compound found in various plants and has been studied for
its anti-inflammatory and antiviral properties. Resveratrol has been shown to regulate miR-223-3p/NLRP3
pathways, inhibit downstream caspase-1 activation, reduce the expression of chemokines, and decrease
the levels of calcium strength, pro-inflammatory cytokines, and MDA in an acute bacterial meningitis model.
It can also regulate the PI3K/Akt/mTOR signaling pathway, reduce NF-κB/p65 and pro-inflammatory cytokines,
and increase nitric oxide, sialic acid, gastric tissue, and vitamin C concentrations. Resveratrol has been
found to inhibit viral replication and have antiviral activity against Zika Virus, Pseudorabies virus,
and HSV-1. The exact mechanisms of action of resveratrol are still not fully understood, but it is believed
to activate the host's immune defences, affect the TLRs/NF-κB signalling pathway, and directly inhibit
viral gene expression.

# Question a document
pasha@kadia:~ kadia - chat-doc doi:10.1155/2022/7138756 \
  --query "What is the antivirus effect of resveratrol?"

Q: What is the antivirus effect of resveratrol?
A: Resveratrol has been found to have antiviral effects, primarily through its ability to inhibit viral
entry and replication. It has been reported to inhibit the replication of multiple viruses, including
human immunodeficiency virus (HIV), herpes simplex virus (HSV), hepatitis C virus (HCV), and
Zika virus (ZIKV). Resveratrol appears to block the activities of the TIR-domain-containing
adapter-inducing interferon-β (TRIF) complex, suggesting that resveratrol would also inhibit NF-κB
transcription induced by TRIF. Additionally, it has been reported to reduce the activity of respiratory
syncytial virus (RSV) and to stimulate the secretion of higher levels of TNF-α, promoting cell death
and RSV clearance.

# Question enitre science
pasha@kadia:~ kadia - chat-sci "What is the antivirus effect of resveratrol?" --n-chunks 4 --n-documents 10

Q: What is the antivirus effect of resveratrol?
A: Resveratrol has been found to possess antiviral activity against a variety of viruses, including herpes simplex virus, human immunodeficiency virus, and hepatitis C virus. It has been shown to inhibit the replication of several viruses, including HIV, herpes simplex virus, and influenza virus, and to regulate TLR3 expression, thus affecting the recruitment of downstream related factors and finally affecting the regulation process of related signal pathways. It has also been studied for its antiviral activity against Reoviridae, and for its potential to inhibit Zika virus cytopathy effect. It has been active against Epstein virus, rotavirus, and vesicular stomatitis virus, and has been reported to alleviate virus-induced reproductive failure and to promote RSV clearance in the body more quickly.

```


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "kadia",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<3.13",
    "maintainer_email": "",
    "keywords": "",
    "author": "Pasha Podolsky",
    "author_email": "ppodolsky@me.com",
    "download_url": "https://files.pythonhosted.org/packages/e5/7e/019a80903d7dd7d05dc13c8b631d9dc5830fcbf1895a239219cbc1ad452e/kadia-1.0.10.tar.gz",
    "platform": null,
    "description": "# Kadia AI\n\nKadia AI integrates several strategies to use AI for facilitating navigation through science. Shortly, Kadia accept your query, retrieve scholarly publications and books from STC and answer your query using AI and collected documents.\n\nMore technical description:\n- IPFS is utilized to access the Standard Template Construct (STC).\n- STC provides the raw documents for Kadia.\n- Embedding Model constructs embeddings for these documents and Kadia stores these embeddings in the vector database.\n- These embeddings are then used to retrieve relevant documents, and then they are sent to LLM for Q&A and summarization.\n\n## Install\n\nYou should have [installed IPFS](https://libstc.cc/#/help/install-ipfs)\n\nThen, you should install `kadia-ai` package\n```bash\npasha@kadia:~ pip install kadia-ai\n```\n\nand launch qdrant database for storing vectors:\n\n```bash\npasha@kadia:~ docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant\n```\n\nUpon its initial launch, `kadia` will create a `~/.kadia` directory containing a `config.yaml` file.\nYou can edit the config file to point to different IPFS addresses.\n\n## Usage\n\n**Attention!** STC does not contain every book or publication in the world. We are constantly increasing coverage but there is still a lot to do.\nSTC contains metadata for the most of the items, but `links` or `content` fields may be absent.\n\n```console\n# (Optional) Launch Summa search engine, then you will not have to wait bootstrapping every time.\n# It will take a time! Wait until the text `Serving on ...` appears\n# If you decided to launch it, switch to another Terminal window\npasha@kadia:~ geck --ipfs-http-base-url 127.0.0.1:8080 - serve\n```\n\nNow we should initialize Kadia and choose which models will be used:\n\n```console\npasha@kadia:~ kadia - write-config --force\n# or if you want to use OpenAI model, export keys and you should set appropriate models in config:\npasha@kadia:~ export OPENAI_API_KEY=...\npasha@kadia:~ kadia - write-config -l openai --force\n# or if you want to use GPU:\npasha@kadia:~ kadia - write-config --device cuda --force\n\n# Summarize a document\npasha@kadia:~ kadia - sum-doc doi:10.1155/2022/7138756\n\nDocument: doi:10.1155/2022/7138756\nSummarization: Resveratrol is a natural compound found in various plants and has been studied for\nits anti-inflammatory and antiviral properties. Resveratrol has been shown to regulate miR-223-3p/NLRP3\npathways, inhibit downstream caspase-1 activation, reduce the expression of chemokines, and decrease\nthe levels of calcium strength, pro-inflammatory cytokines, and MDA in an acute bacterial meningitis model.\nIt can also regulate the PI3K/Akt/mTOR signaling pathway, reduce NF-\u03baB/p65 and pro-inflammatory cytokines,\nand increase nitric oxide, sialic acid, gastric tissue, and vitamin C concentrations. Resveratrol has been\nfound to inhibit viral replication and have antiviral activity against Zika Virus, Pseudorabies virus,\nand HSV-1. The exact mechanisms of action of resveratrol are still not fully understood, but it is believed\nto activate the host's immune defences, affect the TLRs/NF-\u03baB signalling pathway, and directly inhibit\nviral gene expression.\n\n# Question a document\npasha@kadia:~ kadia - chat-doc doi:10.1155/2022/7138756 \\\n  --query \"What is the antivirus effect of resveratrol?\"\n\nQ: What is the antivirus effect of resveratrol?\nA: Resveratrol has been found to have antiviral effects, primarily through its ability to inhibit viral\nentry and replication. It has been reported to inhibit the replication of multiple viruses, including\nhuman immunodeficiency virus (HIV), herpes simplex virus (HSV), hepatitis C virus (HCV), and\nZika virus (ZIKV). Resveratrol appears to block the activities of the TIR-domain-containing\nadapter-inducing interferon-\u03b2 (TRIF) complex, suggesting that resveratrol would also inhibit NF-\u03baB\ntranscription induced by TRIF. Additionally, it has been reported to reduce the activity of respiratory\nsyncytial virus (RSV) and to stimulate the secretion of higher levels of TNF-\u03b1, promoting cell death\nand RSV clearance.\n\n# Question enitre science\npasha@kadia:~ kadia - chat-sci \"What is the antivirus effect of resveratrol?\" --n-chunks 4 --n-documents 10\n\nQ: What is the antivirus effect of resveratrol?\nA: Resveratrol has been found to possess antiviral activity against a variety of viruses, including herpes simplex virus, human immunodeficiency virus, and hepatitis C virus. It has been shown to inhibit the replication of several viruses, including HIV, herpes simplex virus, and influenza virus, and to regulate TLR3 expression, thus affecting the recruitment of downstream related factors and finally affecting the regulation process of related signal pathways. It has also been studied for its antiviral activity against Reoviridae, and for its potential to inhibit Zika virus cytopathy effect. It has been active against Epstein virus, rotavirus, and vesicular stomatitis virus, and has been reported to alleviate virus-induced reproductive failure and to promote RSV clearance in the body more quickly.\n\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "",
    "version": "1.0.10",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e0dc80b54f683ee7abafee07f840feff3116b63e00b4d42ab9c4ad7d524cf20e",
                "md5": "a9afe41d0b4e57d7c22c277eb2ba565e",
                "sha256": "7f209d2aa1236ee1a78fc36c24015696e48eccd13e1374b01eb80e884b5dd691"
            },
            "downloads": -1,
            "filename": "kadia-1.0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a9afe41d0b4e57d7c22c277eb2ba565e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<3.13",
            "size": 27374,
            "upload_time": "2023-12-18T11:10:28",
            "upload_time_iso_8601": "2023-12-18T11:10:28.247542Z",
            "url": "https://files.pythonhosted.org/packages/e0/dc/80b54f683ee7abafee07f840feff3116b63e00b4d42ab9c4ad7d524cf20e/kadia-1.0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e57e019a80903d7dd7d05dc13c8b631d9dc5830fcbf1895a239219cbc1ad452e",
                "md5": "4253841560efb792161aea9a0c17f97d",
                "sha256": "aa25cac77ec0696b3f1824732101943c4bc042cb56f9366500d563ba048922f2"
            },
            "downloads": -1,
            "filename": "kadia-1.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "4253841560efb792161aea9a0c17f97d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<3.13",
            "size": 24317,
            "upload_time": "2023-12-18T11:10:31",
            "upload_time_iso_8601": "2023-12-18T11:10:31.738555Z",
            "url": "https://files.pythonhosted.org/packages/e5/7e/019a80903d7dd7d05dc13c8b631d9dc5830fcbf1895a239219cbc1ad452e/kadia-1.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-18 11:10:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "kadia"
}
        
Elapsed time: 0.21569s