---
title: "AI a online služby"
project: Total.js Flow
version: 11.1
section: components
language: sk
license: MIT
url: https://totaljs.es/docs/sk/flow/11-1/components/ai-and-online-services/
updated: 2026-11-20T06:50:57.962Z
---

# AI a online služby

> Komponenty, ktoré komunikujú s jazykovými modelmi a inými online službami.

Komponenty, ktoré komunikujú s jazykovými modelmi a inými online službami. Táto stránka obsahuje skupiny katalógu **AI**, **Ollama**, **Services**, **External**.

Každá položka uvádza vstupy a výstupy komponentu, jeho hlavné nastavenia a text jeho readme. Ako pridať komponent do FlowStreamu, nájdeš v návode [Stiahnutie komponentov](/flow/11-1/guides/download-components/).

## API

### chatgpt.html · version 3

Type: `component`

Pošle prichádzajúci text do ChatGPT a vráti odpoveď.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `model` | `String` | no | `gpt-3.5-turbo-instruct` | Model. Jedna z hodnôt: `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 kľúč. |
| `question` | `String` | no |  | Otázka. |

**Vstupy:** `input` (Question).  
**Výstupy:** `output` (Answer), `error` (Error).

Tento komponent dokáže komunikovať s ChatGPT.

**Vstup**

Vstup závisí od zvoleného modelu

- __CPT 3.5 Turbo__ a __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'
```

**Výstup**

Aj výstup závisí od zvoleného modelu
- __CPT 3.5 Turbo__ a __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`

Načíta Markdown kontexty pre jazykový model.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `path` | `String` | no | `content` | Vlastnosť s obsahom. |

**Vstupy:** `input` (Input).  
**Výstupy:** `output` (Output).

Tento komponent dokáže načítať viacero Markdown kontextov pre LLM. Nahrádza textové frázy definované v hlavičke, napríklad `[filename_defined_in_the_header]`, obsahom definovaným v kontexte.

__Príklad kontextu__:

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

MARKDOWN 1

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

MARKDOWN 2
```

**Použitie**

```
[document1.md]
```

__Výstup__:

```
MARKDOWN 1
```

### googlesearch.html · version 1

Type: `component`

Vyhľadá kľúčové slovo v Google.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `lang` | `String` | no | `en` | Jazyk. |
| `limit` | `Number` | no | `5` | Limit výsledkov. |

**Vstupy:** `input` (Input).  
**Výstupy:** `output` (Output).

Keď pridáš komponent, Flow nainštaluje npm balík `google-it`.

Tento komponent dokáže vygoogliť akékoľvek kľúčové slovo.

__Konfigurácia__

- `Language (optional)` : jazyk vyhľadávania;
- `Limit (optional)` : obmedzí počet výsledkov.

__Vstup__

- `Object` | String : vstup očakáva `data: String` alebo `data.text: String` ako kľúčové slová na vyhľadanie.

__Výstup__

- `Array` nájdených výsledkov:

### ollamals.html · version 1

Type: `component`

Vypíše modely servera Ollama.

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

**Vstupy:** žiadne.  
**Výstupy:** žiadne.

FlowStream môže obsahovať iba jeden uzol tohto komponentu.

Tento komponent vypíše všetky modely OLLAMA.

### ollamaprompt.html · version 1

Type: `component`

Pošle prompt modelu Ollama.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `think` | `Boolean` | no | `false` | Premýšľanie. |
| `url` | `String` | no |  | Endpoint OLLAMA. |
| `model` | `String` | no |  | Model. |
| `parse` | `Boolean` | no | `false` | Spracovať odpoveď ako JSON objekt. |
| `system` | `String` | no |  | Systémový prompt. |
| `temperature` | `Number` | no | `-1` | Teplota. |

**Vstupy:** `input` (Prompt).  
**Výstupy:** `output` (Response), `error` (Error).

Tento komponent pošle prompt do enginu OLLAMA.

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

Komponent uloží __odpoveď__ do vlastnosti `response` a __chybu__ do vlastnosti `error`. Výstupom je text.

### ollamawebsearch.html · version 1

Type: `component`

Vyhľadáva na webe pomocou Ollama Web Search API.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `token` | `String` | no |  | API token Ollama. |
| `path` | `String` | no | `response` | Cesta k odpovedi. |
| `prop` | `String` | no | `search` | Načítať vyhľadávací dopyt. |
| `merge` | `Boolean` | no | `false` | Zlúčiť obsah dokopy. |

**Vstupy:** `input` (Input).  
**Výstupy:** `output` (Output), `error` (Error).

Tento komponent používa Ollama Web Search API na vyhľadávanie na webe. Na overenie a prístup k službe potrebuješ platný API token Ollama.

__Payload__:

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

__Odpoveď__:

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

### opensync.html · version 2

Type: `component`

Prijíma údaje z aplikácie OpenSync.

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

**Vstupy:** žiadne.  
**Výstupy:** `output` (Output).

Tento komponent prijíma údaje z aplikácie [OpenSync](https://docs.totaljs.com/opensync/). Príklad údajov:

```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`

Načíta údaje o počasí z OpenWeatherMap.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `type` | `String` | no | `current` | Typ požiadavky. Jedna z hodnôt: `current` (Current Weather), `forecast` (Forecast). |
| `apikey` | `String` | no |  | API kľúč. |
| `mode` | `String` | no | `json` | Typ výstupu. Jedna z hodnôt: `json` (JSON), `xml` (XML), `html` (HTML). |
| `time` | `String` | no | `hourly` | Čas. Jedna z hodnôt: `hourly` (Hourly (4 days data)), `daily` (Daily (16 days data)), `climate` (Climate Forecast (30 Days)). |

**Vstupy:** `input` (Input).  
**Výstupy:** `output` (Output), `error` (Error).

Tento komponent dokáže získať údaje o počasí z [OpenWheatherMap](https://openweathermap.org/api/);

__Vstup__:

```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
	}
```
