ollamac


Nameollamac JSON
Version 0.1.2 PyPI version JSON
download
home_page
Summary
upload_time2023-11-04 16:20:35
maintainer
docs_urlNone
authorPromotos
requires_python>=3.10,<4.0
licenseApache-2.0
keywords ollama command line interface
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ollama Command Line Interface

## Installation

### Windows
1. Install Ubuntu on WSL via  `wsl ---install`
2. Start Ubuntu
3. Install CUDA (https://docs.nvidia.com/cuda/wsl-user-guide/index.html)
4. Install Ollama (https://ollama.ai/download/linux)

## Start Ollama

After the installation start Ollama by `ollama serve`

If you get an error like
```
Error: listen tcp 127.0.0.1:11434: bind: address already in use
```

You can define the address to use for Ollama by setting the environment variable `OLLAMA_HOST`
```
export OLLAMA_HOST=localhost:8888
```

Run the LLM serving should give you the following output
```
wsl:~$ ollama serve
2023/10/25 19:38:15 images.go:822: total blobs: 0
2023/10/25 19:38:15 images.go:829: total unused blobs removed: 0
2023/10/25 19:38:15 routes.go:662: Listening on 127.0.0.1:8888 (version 0.1.5)
```

## Pull a model
This step is optional. On the first usage, the model will get pulled anyway.
Execute the following command to pull the llama2 model.
```
ollama pull llama2
```
Make sure you are using the same OLLAMA_HOST where your server is started.

On the server you should see output like:
```
[GIN] 2023/10/25 - 19:45:38 | 200 |        35.1µs |       127.0.0.1 | HEAD     "/"
[GIN] 2023/10/25 - 19:45:38 | 200 |     385.599µs |       127.0.0.1 | GET      "/api/tags"
2023/10/25 19:45:41 download.go:126: downloading 22f7f8ef5f4c in 64 59 MB part(s)
...
```

## Install ollamac
* Execute `pip install ollamac`

## Usage

```bash
usage: ollamac.py [-h] [--model MODEL] [--host HOST] [--port PORT] [--sync]
                  prompt

ollama command line utility.

positional arguments:
  prompt         Required prompt to be send to the ollama model.

options:
  -h, --help     show this help message and exit
  --model MODEL  The name of the ollama model to use. Default is "llama2".
  --host HOST    The hostname where ollama serve is running. Default is
                 "localhost".
  --port PORT    The port where ollama serve is running. Default is "8888".
  --sync         This switch executes the query synchronous.
```

## Examples

### Blogpost
```bash
(.venv) PS F:\git\playground> python -m ollamac "Write a blogpost about the new iphone 15 in 400 words."                  

Title: The New iPhone 15: A Game-Changer in Smartphone Technology

Apple has just released its latest and greatest iPhone, the iPhone 15, and it's a real showstopper. Packed with cutting-edge technology and design innovations, this phone is sure to revolutionize the way we use our smartphones. Here are some of the most exciting features of the new iPhone 15:

Super Retina XDR Display: The iPhone 15 boasts a stunning Super Retina XDR display, which offers an unparalleled viewing experience. With a 120Hz refresh rate and a peak brightness of 1000 nits, this display is perfect for watching videos, playing games, and browsing the web.

A15 Bionic Chip: The iPhone 15 is powered by Apple's latest A15 Bionic chip, which provides lightning-fast performance and efficiency. This chip offers a 20% boost in processing speed and a 40% improvement in energy efficiency compared to the previous generation.       

Triple-Lens Camera: The iPhone 15 features a triple-lens camera system, including a wide-angle lens, a telephoto lens, and a macro lens. This allows users to capture stunning photos and videos with unparalleled detail and depth. The camera also supports advanced features like night mode, portrait mode, and more.

Longer Battery Life: With up to 12 hours of internet use on a single charge, the iPhone 15 offers significantly longer battery life than its predecessors. This means users can enjoy their phone all day without needing to worry about running out of juice.

Wireless Charging: The iPhone 15 supports wireless charging, allowing users to simply place their phone on a charging pad to recharge. This feature is especially convenient for those who are always on the go and don't want to be tethered to a cord.

Enhanced Security: With advanced biometric authentication features like Face ID and Touch ID, the iPhone 15 offers an unparalleled level of security. Users can securely unlock their phone with just a glance or a fingerprint, keeping their personal information safe from prying eyes.

Overall, the new iPhone 15 is a game-changer in smartphone technology. With its stunning display, powerful processor, advanced camera system, longer battery life, wireless charging capabilities, and enhanced security features, this phone is sure to revolutionize the way we use our smartphones. Whether you're a tech enthusiast or just looking for an upgrade, the iPhone 15 is definitely worth checking out.
```
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ollamac",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "ollama,command line interface",
    "author": "Promotos",
    "author_email": "promotos@gmx.de",
    "download_url": "https://files.pythonhosted.org/packages/ea/de/8c5eb897379ddd08bd1bf5984ecbaeccdd965ad5978b6f4af0708cb92119/ollamac-0.1.2.tar.gz",
    "platform": null,
    "description": "# ollama Command Line Interface\n\n## Installation\n\n### Windows\n1. Install Ubuntu on WSL via  `wsl ---install`\n2. Start Ubuntu\n3. Install CUDA (https://docs.nvidia.com/cuda/wsl-user-guide/index.html)\n4. Install Ollama (https://ollama.ai/download/linux)\n\n## Start Ollama\n\nAfter the installation start Ollama by `ollama serve`\n\nIf you get an error like\n```\nError: listen tcp 127.0.0.1:11434: bind: address already in use\n```\n\nYou can define the address to use for Ollama by setting the environment variable `OLLAMA_HOST`\n```\nexport OLLAMA_HOST=localhost:8888\n```\n\nRun the LLM serving should give you the following output\n```\nwsl:~$ ollama serve\n2023/10/25 19:38:15 images.go:822: total blobs: 0\n2023/10/25 19:38:15 images.go:829: total unused blobs removed: 0\n2023/10/25 19:38:15 routes.go:662: Listening on 127.0.0.1:8888 (version 0.1.5)\n```\n\n## Pull a model\nThis step is optional. On the first usage, the model will get pulled anyway.\nExecute the following command to pull the llama2 model.\n```\nollama pull llama2\n```\nMake sure you are using the same OLLAMA_HOST where your server is started.\n\nOn the server you should see output like:\n```\n[GIN] 2023/10/25 - 19:45:38 | 200 |        35.1\u00b5s |       127.0.0.1 | HEAD     \"/\"\n[GIN] 2023/10/25 - 19:45:38 | 200 |     385.599\u00b5s |       127.0.0.1 | GET      \"/api/tags\"\n2023/10/25 19:45:41 download.go:126: downloading 22f7f8ef5f4c in 64 59 MB part(s)\n...\n```\n\n## Install ollamac\n* Execute `pip install ollamac`\n\n## Usage\n\n```bash\nusage: ollamac.py [-h] [--model MODEL] [--host HOST] [--port PORT] [--sync]\n                  prompt\n\nollama command line utility.\n\npositional arguments:\n  prompt         Required prompt to be send to the ollama model.\n\noptions:\n  -h, --help     show this help message and exit\n  --model MODEL  The name of the ollama model to use. Default is \"llama2\".\n  --host HOST    The hostname where ollama serve is running. Default is\n                 \"localhost\".\n  --port PORT    The port where ollama serve is running. Default is \"8888\".\n  --sync         This switch executes the query synchronous.\n```\n\n## Examples\n\n### Blogpost\n```bash\n(.venv) PS F:\\git\\playground> python -m ollamac \"Write a blogpost about the new iphone 15 in 400 words.\"                  \n\nTitle: The New iPhone 15: A Game-Changer in Smartphone Technology\n\nApple has just released its latest and greatest iPhone, the iPhone 15, and it's a real showstopper. Packed with cutting-edge technology and design innovations, this phone is sure to revolutionize the way we use our smartphones. Here are some of the most exciting features of the new iPhone 15:\n\nSuper Retina XDR Display: The iPhone 15 boasts a stunning Super Retina XDR display, which offers an unparalleled viewing experience. With a 120Hz refresh rate and a peak brightness of 1000 nits, this display is perfect for watching videos, playing games, and browsing the web.\n\nA15 Bionic Chip: The iPhone 15 is powered by Apple's latest A15 Bionic chip, which provides lightning-fast performance and efficiency. This chip offers a 20% boost in processing speed and a 40% improvement in energy efficiency compared to the previous generation.       \n\nTriple-Lens Camera: The iPhone 15 features a triple-lens camera system, including a wide-angle lens, a telephoto lens, and a macro lens. This allows users to capture stunning photos and videos with unparalleled detail and depth. The camera also supports advanced features like night mode, portrait mode, and more.\n\nLonger Battery Life: With up to 12 hours of internet use on a single charge, the iPhone 15 offers significantly longer battery life than its predecessors. This means users can enjoy their phone all day without needing to worry about running out of juice.\n\nWireless Charging: The iPhone 15 supports wireless charging, allowing users to simply place their phone on a charging pad to recharge. This feature is especially convenient for those who are always on the go and don't want to be tethered to a cord.\n\nEnhanced Security: With advanced biometric authentication features like Face ID and Touch ID, the iPhone 15 offers an unparalleled level of security. Users can securely unlock their phone with just a glance or a fingerprint, keeping their personal information safe from prying eyes.\n\nOverall, the new iPhone 15 is a game-changer in smartphone technology. With its stunning display, powerful processor, advanced camera system, longer battery life, wireless charging capabilities, and enhanced security features, this phone is sure to revolutionize the way we use our smartphones. Whether you're a tech enthusiast or just looking for an upgrade, the iPhone 15 is definitely worth checking out.\n```",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [
        "ollama",
        "command line interface"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d9de9bdd5c0a7681d845ce74ad7a7048724ab9bd9ea749678a3d82083d959ab",
                "md5": "57a57c9d815bd88dab3a9ee9abfdb6c6",
                "sha256": "adfbb1b98fa3d0530c7e5a80c922a3bf1921115fd1ce65701d46532ba2388833"
            },
            "downloads": -1,
            "filename": "ollamac-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "57a57c9d815bd88dab3a9ee9abfdb6c6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 5020,
            "upload_time": "2023-11-04T16:20:34",
            "upload_time_iso_8601": "2023-11-04T16:20:34.365399Z",
            "url": "https://files.pythonhosted.org/packages/5d/9d/e9bdd5c0a7681d845ce74ad7a7048724ab9bd9ea749678a3d82083d959ab/ollamac-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eade8c5eb897379ddd08bd1bf5984ecbaeccdd965ad5978b6f4af0708cb92119",
                "md5": "96e86beb1b42f3422233a53c33f06e0e",
                "sha256": "a70edbfbed424fb72b987baa417b2c102167c03498dfb8cf68b6900c9de0cd34"
            },
            "downloads": -1,
            "filename": "ollamac-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "96e86beb1b42f3422233a53c33f06e0e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 4464,
            "upload_time": "2023-11-04T16:20:35",
            "upload_time_iso_8601": "2023-11-04T16:20:35.522056Z",
            "url": "https://files.pythonhosted.org/packages/ea/de/8c5eb897379ddd08bd1bf5984ecbaeccdd965ad5978b6f4af0708cb92119/ollamac-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-04 16:20:35",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ollamac"
}
        
Elapsed time: 2.12246s