Name | llama-index-tools-text-to-image JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | llama-index tools text_to_image integration |
upload_time | 2024-08-22 07:41:25 |
maintainer | ajhofmann |
docs_url | None |
author | Your Name |
requires_python | <4.0,>=3.9 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Text to Image Tool
This tool allows Agents to use the OpenAI Image endpoint to generate and create variations of images.
## Usage
This tool has more extensive example usage documented in a Jupyter notebook [here](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-text-to-image/examples/text_to_image.ipynb)
Another example showcases retrieval augmentation over a knowledge corpus with text-to-image. [Notebook](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-text-to-image/examples/text_to_image-pg.ipynb).
```python
from llama_index.tools.text_to_image import TextToImageToolSpec
from llama_index.agent.openai import OpenAIAgent
openai.api_key = "sk-your-key"
tool_spec = TextToImageToolSpec()
# OR
tool_spec = TextToImageToolSpec(api_key="sk-your-key")
agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())
agent.chat("show 2 images of a beautiful beach with a palm tree at sunset")
agent.chat("make the second image higher quality")
```
`generate_images`: Generate images from a prompt, specifying the number of images and resolution
`show_images`: Show the images using matplot, useful for Jupyter notebooks
`generate_image_variation`: Generate a variation of an image given a URL.
This loader is designed to be used as a way to load data as a Tool in a Agent.
Raw data
{
"_id": null,
"home_page": null,
"name": "llama-index-tools-text-to-image",
"maintainer": "ajhofmann",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Your Name",
"author_email": "you@example.com",
"download_url": "https://files.pythonhosted.org/packages/5d/5a/6a081b6e9ead2ae63b3529f23c0af0a26f7dffdf03eedbbd03d22a93c68a/llama_index_tools_text_to_image-0.2.0.tar.gz",
"platform": null,
"description": "# Text to Image Tool\n\nThis tool allows Agents to use the OpenAI Image endpoint to generate and create variations of images.\n\n## Usage\n\nThis tool has more extensive example usage documented in a Jupyter notebook [here](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-text-to-image/examples/text_to_image.ipynb)\n\nAnother example showcases retrieval augmentation over a knowledge corpus with text-to-image. [Notebook](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-text-to-image/examples/text_to_image-pg.ipynb).\n\n```python\nfrom llama_index.tools.text_to_image import TextToImageToolSpec\nfrom llama_index.agent.openai import OpenAIAgent\n\nopenai.api_key = \"sk-your-key\"\ntool_spec = TextToImageToolSpec()\n# OR\ntool_spec = TextToImageToolSpec(api_key=\"sk-your-key\")\n\nagent = OpenAIAgent.from_tools(tool_spec.to_tool_list())\n\nagent.chat(\"show 2 images of a beautiful beach with a palm tree at sunset\")\nagent.chat(\"make the second image higher quality\")\n```\n\n`generate_images`: Generate images from a prompt, specifying the number of images and resolution\n`show_images`: Show the images using matplot, useful for Jupyter notebooks\n`generate_image_variation`: Generate a variation of an image given a URL.\n\nThis loader is designed to be used as a way to load data as a Tool in a Agent.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "llama-index tools text_to_image integration",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "41cc83726620104c46579821f964832e53800c14b4ed14e10263e65aa61597a8",
"md5": "a2f65f33d9500d22b4d253c457b97ab3",
"sha256": "4b42231d2d8a57dcd68ee75379563bf4cad288c2f90ff26a43d3db601e202ed3"
},
"downloads": -1,
"filename": "llama_index_tools_text_to_image-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a2f65f33d9500d22b4d253c457b97ab3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 3281,
"upload_time": "2024-08-22T07:41:24",
"upload_time_iso_8601": "2024-08-22T07:41:24.191774Z",
"url": "https://files.pythonhosted.org/packages/41/cc/83726620104c46579821f964832e53800c14b4ed14e10263e65aa61597a8/llama_index_tools_text_to_image-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5d5a6a081b6e9ead2ae63b3529f23c0af0a26f7dffdf03eedbbd03d22a93c68a",
"md5": "429fee3a3b4faa5ece579b13d98a235e",
"sha256": "a89a78365e3e99f54b52b639fcfe9c9a537136364db20c8db97e7a4af0d5a02a"
},
"downloads": -1,
"filename": "llama_index_tools_text_to_image-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "429fee3a3b4faa5ece579b13d98a235e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 2993,
"upload_time": "2024-08-22T07:41:25",
"upload_time_iso_8601": "2024-08-22T07:41:25.561836Z",
"url": "https://files.pythonhosted.org/packages/5d/5a/6a081b6e9ead2ae63b3529f23c0af0a26f7dffdf03eedbbd03d22a93c68a/llama_index_tools_text_to_image-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-22 07:41:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-tools-text-to-image"
}