---
title: AI and online services
project: Flow
version: 11.1
section: components
language: en
license: MIT
url: https://totaljs.es/docs/flow/11-1/components/ai-and-online-services/
updated: 2026-11-20T06:50:57.962Z
---

# AI and online services

> Components that talk to language models and other online services.

Components that talk to language models and other online services. This page holds the catalogue groups **AI**, **Ollama**, **Services**, **External**.

Each entry lists the inputs and outputs of the component, its main settings and the text of its readme. To add a component to a FlowStream, see [Download components](/flow/11-1/guides/download-components/).

## API

### chatgpt.html · version 3

Type: `component`

Sends the incoming text to ChatGPT and returns the answer.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `model` | `String` | no | `gpt-3.5-turbo-instruct` | Model. One of: `gpt-4` (GPT 4), `gpt-3.5-turbo` (GPT 3.5 Turbo), `gpt-3.5-turbo-instruct` (GPT 3.5 Turbo instruct), `Whisper` (whisper-1). |
| `apikey` | `String` | no |  | API key. |
| `question` | `String` | no |  | Question. |

**Inputs:** `input` (Question).  
**Outputs:** `output` (Answer), `error` (Error).

This component can talk to ChatGPT.

**Input**

Input will depend on selected model

- __CPT 3.5 Turbo__ and __CPT 4__

```js

// Object
{
messages : [{ role: 'user', content: 'Text' }]
}

// or

// Array
[{ role: 'assistant', content: 'Text' }]
```

- __Whisper__

```js

// Object
{
path : 'path-to-file'
}

// or

// String
'path-to-file'
```

- __CPT 3.5 Turbo instruct__

```js

// Object
{
text : 'your question'
}

// or

// String
'your question'
```

**Output**

Output also depends on selected model
- __CPT 3.5 Turbo__ and __CPT 4__

```js
'Response from assistant'
```

- __Whisper__

```js

// Object
{
text : 'transcipted text'
}
```

- __CPT 3.5 Turbo instruct__

```js

// String
'Response from assistant'
```

### aicontext.html · version 1

Type: `component`

Loads Markdown contexts for a language model.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `path` | `String` | no | `content` | Content property. |

**Inputs:** `input` (Input).  
**Outputs:** `output` (Output).

This component can load multiple Markdown contexts for the LLM. It replaces text phrases defined in the header, such as `[filename_defined_in_the_header]` with the content defined in the context.

__Context example__:

```md
----------------------------------------------------------------
Name: document1.md
----------------------------------------------------------------

MARKDOWN 1

----------------------------------------------------------------
Name: document2.md
----------------------------------------------------------------

MARKDOWN 2
```

**Usage**

```
[document1.md]
```

__Output__:

```
MARKDOWN 1
```

### googlesearch.html · version 1

Type: `component`

Searches Google for a keyword.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `lang` | `String` | no | `en` | Language. |
| `limit` | `Number` | no | `5` | Results limit. |

**Inputs:** `input` (Input).  
**Outputs:** `output` (Output).

Flow installs the npm package `google-it` when you add the component.

This component can google any keyword you want.

__Configuration__

- `Language (optional)` : Search language;
- `Limit (optional)` : Limit number of results.

__Input__

- `Object` | String : input expects `data: String` or `data.text: String` as search keywords.

__Output__

- `Array` of found results:

### ollamals.html · version 1

Type: `component`

Lists the models of an Ollama server.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `url` | `String` | no | `http://localhost:11434` | OLLAMA endpoint. |

**Inputs:** none.  
**Outputs:** none.

A FlowStream can hold only one node of this component.

This component list all OLLAMA models.

### ollamaprompt.html · version 1

Type: `component`

Sends a prompt to an Ollama model.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `think` | `Boolean` | no | `false` | Thinking. |
| `url` | `String` | no |  | OLLAMA endpoint. |
| `model` | `String` | no |  | Model. |
| `parse` | `Boolean` | no | `false` | Parse response as JSON object. |
| `system` | `String` | no |  | System prompt. |
| `temperature` | `Number` | no | `-1` | Temperature. |

**Inputs:** `input` (Prompt).  
**Outputs:** `output` (Response), `error` (Error).

This component makes a prompt into the OLLAMA engine.

```js
{
	model: 'qwen3.5:9b', // optional
	think: true, // optional
	content: 'User message',
	images: ['base64'] // optional
}
```

The component saves the __response__ to the `response` property and the __error__ to the `error` property. The output is text.

### ollamawebsearch.html · version 1

Type: `component`

Searches the web with the Ollama Web Search API.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `token` | `String` | no |  | Ollama API Token. |
| `path` | `String` | no | `response` | Path to response. |
| `prop` | `String` | no | `search` | Read search query. |
| `merge` | `Boolean` | no | `false` | Merge content together. |

**Inputs:** `input` (Input).  
**Outputs:** `output` (Output), `error` (Error).

This component uses the Ollama Web Search API to perform web searches. A valid Ollama API token is required for authentication and access to the service.

__Payload__:

```js
{
	search: 'Total.js Platform'
}
```

__Response__:

```json
[
	{
		"title": "...",
		"url": "https://www.totaljs.com",
		"content": "..."
	}
]
```

### opensync.html · version 2

Type: `component`

Receives data from the OpenSync app.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `url` | `String` | no |  | URL address + token. |

**Inputs:** none.  
**Outputs:** `output` (Output).

This component receives a data from the [OpenSync](https://docs.totaljs.com/opensync/) app. Data example:

```js
{
	id: String,              // Internal ID
	type: String,            // Parsed content-type (can be empty with the "GET" method)
	channel: String,         // Channel
	ip: String,              // Host IP address
	method: String,          // HTTP method (upper-case)
	headers: Object,         // Key:value
	query: Object,           // Key:value
	body: Object,            // JSON/key:value/String
	ua: String,              // Parsed user-agent
	files: [Object Array]    // Uploaded files { filename: String, extension: String, type: String, size: Number, url: String, width: Number, height: Number }
}
```

### openweather.html · version 1

Type: `component`

Reads weather data from OpenWeatherMap.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `type` | `String` | no | `current` | Request Type. One of: `current` (Current Weather), `forecast` (Forecast). |
| `apikey` | `String` | no |  | Api key. |
| `mode` | `String` | no | `json` | Output Type. One of: `json` (JSON), `xml` (XML), `html` (HTML). |
| `time` | `String` | no | `hourly` | Time. One of: `hourly` (Hourly (4 days data)), `daily` (Daily (16 days data)), `climate` (Climate Forecast (30 Days)). |

**Inputs:** `input` (Input).  
**Outputs:** `output` (Output), `error` (Error).

This component can retieve weather data from [OpenWheatherMap](https://openweathermap.org/api/);

__Input__:

```js
	{
		query: String,         // Optional, City name, Country code, State code e.g: London, Ouagadougou, sk
		lon: String,           // Optional, Longitude
		lat: String,           // Optional, Latitude
		lang: String,          // Optional, Output language e.g: `en`, `de`, `sk`, `fr` etc...
		units: String,         // Optional, standard, metric, imperial
		date: String           // Optional,  Timestamp (Unix time, UTC time zone), e.g. date=1586468027
	}
```
