Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates text generation with Ollama AI models for creative projects, including image inputs for enhanced content creation.
The OllamaAPI node is designed to facilitate interaction with the Ollama AI models, providing a seamless way to generate text content based on user-defined prompts. This node is particularly beneficial for AI artists and creators who wish to leverage advanced AI models to enhance their creative projects. By connecting to the Ollama API, this node allows you to specify a model and input a prompt, which the model then uses to generate a textual response. The node is capable of handling additional inputs such as images, which can be encoded and sent along with the prompt to influence the generated content. This flexibility makes the OllamaAPI node a powerful tool for generating creative and contextually relevant text outputs, enhancing the creative process with AI-driven insights.
The prompt
parameter is a string input that serves as the primary text input for the Ollama model. It is the question or statement you want the model to respond to. The default value is "What is the meaning of life?", and it supports multiline text, allowing for complex and detailed prompts. This parameter is crucial as it directly influences the content and relevance of the generated output.
The ollama_model
parameter allows you to select from a list of available Ollama models. This selection determines which model will process the input prompt. The models are fetched dynamically from the Ollama API, and if the fetch fails, it defaults to using the "llama2" model. Choosing the right model can significantly impact the style and accuracy of the generated content.
The keep_alive
parameter is an integer that specifies the duration, in minutes, for which the connection to the Ollama API should be maintained. It ranges from 0 to 60, with a default value of 0. This parameter is useful for managing API session persistence, which can be beneficial in scenarios where multiple requests are made in quick succession.
The image
parameter is an optional input that allows you to include an image as part of the request. If provided, the image is converted to a base64-encoded string and sent along with the prompt. This can be used to provide additional context or influence the text generation process based on visual input.
The text
output parameter is a string that contains the generated response from the Ollama model. This output is the result of processing the input prompt (and optionally, the image) through the selected model. The generated text can be used in various creative applications, providing insights, narratives, or other forms of textual content that align with the input parameters.
keep_alive
parameter to maintain a persistent connection if you plan to make multiple requests in a short period, which can improve performance by reducing connection overhead.<status_code>
<error_message>
RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.