Ollama
Integrate with open source LLMs using Ollama. With an instance of Ollama running locally you can use this integration to have a conversation in an Incident, download models, and create new models.
Utilities · Ollama
Details
| ID | Ollama |
|---|---|
| Provider | Open Source |
| Category | Utilities |
| From Version | 6.0.0 |
| Docker Image | demisto/python3:3.12.8.3296088 |
| Supported Modules | Agentix XSIAM |
README
Integrate with open source LLMs using Ollama. With an instance of Ollama running locally you can use this integration to have a conversation in an Incident, download models, and create new models.
Configure Ollama in Cortex
| Parameter | Description | Required |
|---|---|---|
| Protocol | HTTP or HTTPS | False |
| Server hostname or IP | Enter the Ollama IP or hostname | True |
| Port | The port Ollama is running on | True |
| Path | By default Ollama’s API path is /api, but you may be running it behind a proxy with a different path. | True |
| Trust any certificate (not secure) | Trust any certificate (not secure) | False |
| Use system proxy settings | Use system proxy settings | False |
| Cloudflare Access Client Id | If Ollama is running behind CLoudflare ZeroTrust, provide the Service Access ID here. | False |
| Cloudflare Access Client Secret | If Ollama is running behind CLoudflare ZeroTrust, provide the Service Access Secret here. | False |
| Default Model | Some commands allow you to specify a model. If no model is provided, this value will be used. | False |
Commands
You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.
ollama-list-models
Get a list of all available models
Base Command
ollama-list-models
Input
| Argument Name | Description | Required |
| — | — | — |
Context Output
| Path | Type | Description |
|---|---|---|
| ollama.models | unknown | Output of the command |
ollama-model-pull
Pull a model
Base Command
ollama-model-pull
Input
| Argument Name | Description | Required |
|---|---|---|
| model | Name of model to pull. See https://ollama.com/library for a list of options. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ollama.pull | unknown | Output of the command |
ollama-model-delete
Delete a model
Base Command
ollama-model-delete
Input
| Argument Name | Description | Required |
|---|---|---|
| model | The name of the model to delete. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ollama.delete | unknown | Output of the command |
ollama-conversation
General chat command that tracks the conversation history in the Incident.
Base Command
ollama-conversation
Input
| Argument Name | Description | Required |
|---|---|---|
| model | The model name. | Optional |
| message | The message to be sent. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| ollama.history | unknown | Output of the command |
ollama-model-info
Show information for a specific model.
Base Command
ollama-model-info
Input
| Argument Name | Description | Required |
|---|---|---|
| model | name of the model to show. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ollama.show | unknown | Output of the command |
ollama-model-create
Create a new model from a Modelfile.
Base Command
ollama-model-create
Input
| Argument Name | Description | Required |
|---|---|---|
| model | name of the model to create. | Required |
| model_file | contents of the Modelfile. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| ollama.create | unknown | Output of the command |
ollama-generate
Generate a response for a given prompt with a provided model. Conversation history IS NOT tracked.
Base Command
ollama-generate
Input
| Argument Name | Description | Required |
|---|---|---|
| model | The model name. | Optional |
| message | The message to be sent. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ollama.generate | unknown | Output of the command |
Configuration parameters
protocol— Protocolhost— Server hostname or IP (required)port— Port (required)path— Path (required)insecure— Trust any certificate (not secure)proxy— Use system proxy settingscf_id— Cloudflare Access Client Idcf_secret— Cloudflare Access Client Secretdefault_model— Default Model
Commands (7)
-
ollama-conversationGeneral chat command that tracks the conversation history in the Incident.
-
ollama-generateGenerate a response for a given prompt with a provided model. Conversation history IS NOT tracked.
-
ollama-list-modelsGet a list of all available models.
-
ollama-model-createCreate a new model from a Modelfile.
-
ollama-model-deleteDelete a model.
-
ollama-model-infoShow information for a specific model.
-
ollama-model-pullPull a model.
category: Utilities provider: Open Source commonfields: id: Ollama version: -1 configuration: - additionalinfo: HTTP or HTTPS defaultvalue: http display: Protocol name: protocol options: - http - https required: false type: 15 - additionalinfo: Enter the Ollama IP or hostname defaultvalue: 192.168.1.1 display: Server hostname or IP name: host required: true section: Connect type: 0 - additionalinfo: The port Ollama is running on defaultvalue: '11434' display: Port name: port required: true type: 0 - additionalinfo: By default Ollama's API path is /api, but you may be running it behind a proxy with a different path. defaultvalue: /api display: Path name: path required: true type: 0 - additionalinfo: Trust any certificate (not secure) advanced: true display: Trust any certificate (not secure) name: insecure required: false section: Connect type: 8 - additionalinfo: Use system proxy settings advanced: true display: Use system proxy settings name: proxy required: false section: Connect type: 8 - additionalinfo: If Ollama is running behind CLoudflare ZeroTrust, provide the Service Access ID here. display: Cloudflare Access Client Id name: cf_id required: false type: 0 - additionalinfo: If Ollama is running behind CLoudflare ZeroTrust, provide the Service Access Secret here. display: Cloudflare Access Client Secret name: cf_secret required: false type: 4 - additionalinfo: Some commands allow you to specify a model. If no model is provided, this value will be used. defaultvalue: llama2:latest display: Default Model name: default_model required: false type: 0 description: Integrate with open source LLMs using Ollama. With an instance of Ollama running locally you can use this integration to have a conversation in an Incident, download models, and create new models. display: Ollama name: Ollama script: commands: - arguments: [] description: Get a list of all available models. name: ollama-list-models outputs: - contextPath: ollama.models description: Output of the command. - arguments: - description: Name of model to pull. See https://ollama.com/library for a list of options. name: model description: Pull a model. name: ollama-model-pull outputs: - contextPath: ollama.pull description: Output of the command. - arguments: - description: The name of the model to delete. name: model description: Delete a model. name: ollama-model-delete outputs: - contextPath: ollama.delete description: Output of the command. - arguments: - description: The model name. name: model - description: The message to be sent. name: message required: true description: General chat command that tracks the conversation history in the Incident. name: ollama-conversation outputs: - contextPath: ollama.history description: Output of the command. - arguments: - description: name of the model to show. name: model description: Show information for a specific model. name: ollama-model-info outputs: - contextPath: ollama.show description: Output of the command. - arguments: - description: name of the model to create. name: model required: true - description: contents of the Modelfile. name: model_file required: true description: Create a new model from a Modelfile. name: ollama-model-create outputs: - contextPath: ollama.create description: Output of the command. - arguments: - description: The model name. name: model - description: The message to be sent. name: message description: Generate a response for a given prompt with a provided model. Conversation history IS NOT tracked. name: ollama-generate outputs: - contextPath: ollama.generate description: Output of the command. dockerimage: demisto/python3:3.12.8.3296088 runonce: false script: '' subtype: python3 type: python fromversion: 6.0.0 tests: - No tests (auto formatted)