llama-index-readers-openalex


Namellama-index-readers-openalex JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
Summaryllama-index readers openalex integration
upload_time2024-05-07 16:27:39
maintainershauryr
docs_urlNone
authorYour Name
requires_python<4.0,>=3.8.1
licenseMIT
keywords academic papers open access openalex scientific papers
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OpenAlex Reader

```bash
pip install llama-index-readers-openalex
```

This loader will search for papers in OpenAlex and load them in llama-index. The main advantage of using OpenAlex is that you can search the full-text for Open Access papers as well.

## Usage

```python
from llama_index.readers.openalex import OpenAlexReader

openalex_reader = OpenAlexReader(email="shauryr@gmail.com")
query = "biases in large language models"

# changing this to full_text=True will let you search full-text
documents = openalex_reader.load_data(query, full_text=False)
```

## What can it do?

As shown in [demo.ipynb](demo.ipynb) we can get answers with citations.

```python
query = "biases in large language models"
response = query_engine.query(
    "list the biases in large language models in a markdown table"
)
```

#### Output

| Source    | Biases                                                                                           |
| --------- | ------------------------------------------------------------------------------------------------ |
| Source 1  | Data selection bias, social bias (gender, age, sexual orientation, ethnicity, religion, culture) |
| Source 2  | Biases of what is right and wrong to do, reflecting ethical and moral norms of society           |
| Source 3  | Anti-Muslim bias                                                                                 |
| Source 6  | Gender bias                                                                                      |
| Source 9  | Anti-LGBTQ+ bias                                                                                 |
| Source 10 | Potential bias in the output                                                                     |

## Credits

- OpenAlex API details are listed [here](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/search-entities)

- Some code adopted from [pyAlex](https://github.com/J535D165/pyalex/blob/435287ac20d84ca047e84c71e2c32a6bb84f61a1/pyalex/api.py#L95)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-readers-openalex",
    "maintainer": "shauryr",
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": "academic papers, open access, openalex, scientific papers",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/fb/64/277eb24518178f8aa0a927e24314a621813b4f90a95551e5e2b66f3730c2/llama_index_readers_openalex-0.1.4.tar.gz",
    "platform": null,
    "description": "# OpenAlex Reader\n\n```bash\npip install llama-index-readers-openalex\n```\n\nThis loader will search for papers in OpenAlex and load them in llama-index. The main advantage of using OpenAlex is that you can search the full-text for Open Access papers as well.\n\n## Usage\n\n```python\nfrom llama_index.readers.openalex import OpenAlexReader\n\nopenalex_reader = OpenAlexReader(email=\"shauryr@gmail.com\")\nquery = \"biases in large language models\"\n\n# changing this to full_text=True will let you search full-text\ndocuments = openalex_reader.load_data(query, full_text=False)\n```\n\n## What can it do?\n\nAs shown in [demo.ipynb](demo.ipynb) we can get answers with citations.\n\n```python\nquery = \"biases in large language models\"\nresponse = query_engine.query(\n    \"list the biases in large language models in a markdown table\"\n)\n```\n\n#### Output\n\n| Source    | Biases                                                                                           |\n| --------- | ------------------------------------------------------------------------------------------------ |\n| Source 1  | Data selection bias, social bias (gender, age, sexual orientation, ethnicity, religion, culture) |\n| Source 2  | Biases of what is right and wrong to do, reflecting ethical and moral norms of society           |\n| Source 3  | Anti-Muslim bias                                                                                 |\n| Source 6  | Gender bias                                                                                      |\n| Source 9  | Anti-LGBTQ+ bias                                                                                 |\n| Source 10 | Potential bias in the output                                                                     |\n\n## Credits\n\n- OpenAlex API details are listed [here](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/search-entities)\n\n- Some code adopted from [pyAlex](https://github.com/J535D165/pyalex/blob/435287ac20d84ca047e84c71e2c32a6bb84f61a1/pyalex/api.py#L95)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index readers openalex integration",
    "version": "0.1.4",
    "project_urls": null,
    "split_keywords": [
        "academic papers",
        " open access",
        " openalex",
        " scientific papers"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "483d193b87d1e872809a233ef6e5f49cb4ca5e465ca244507a5277f99a3051cf",
                "md5": "b23d2706edb98fdeb0871f5d00f0c915",
                "sha256": "f31a346297ffd6c3fe8ec7edaf3c01ea96aefa1752efbf165693df1226be5a3a"
            },
            "downloads": -1,
            "filename": "llama_index_readers_openalex-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b23d2706edb98fdeb0871f5d00f0c915",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 3607,
            "upload_time": "2024-05-07T16:27:38",
            "upload_time_iso_8601": "2024-05-07T16:27:38.429987Z",
            "url": "https://files.pythonhosted.org/packages/48/3d/193b87d1e872809a233ef6e5f49cb4ca5e465ca244507a5277f99a3051cf/llama_index_readers_openalex-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb64277eb24518178f8aa0a927e24314a621813b4f90a95551e5e2b66f3730c2",
                "md5": "f86def682f033b0225f7e0613808377d",
                "sha256": "7e6f88b58979ad2c60c54a3773133a835a87e15bf4936f24a41307ff09816930"
            },
            "downloads": -1,
            "filename": "llama_index_readers_openalex-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "f86def682f033b0225f7e0613808377d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 3315,
            "upload_time": "2024-05-07T16:27:39",
            "upload_time_iso_8601": "2024-05-07T16:27:39.568111Z",
            "url": "https://files.pythonhosted.org/packages/fb/64/277eb24518178f8aa0a927e24314a621813b4f90a95551e5e2b66f3730c2/llama_index_readers_openalex-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-07 16:27:39",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-readers-openalex"
}
        
Elapsed time: 0.24829s