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

# AI e servizi online

> Componenti che parlano con i modelli linguistici e con altri servizi online.

Componenti che parlano con i modelli linguistici e con altri servizi online. Questa pagina contiene i gruppi del catalogo **AI**, **Ollama**, **Services**, **External**.

Ogni voce elenca gli ingressi e le uscite del componente, le sue impostazioni principali e il testo del suo readme. Per aggiungere un componente a un FlowStream, consulta [Scaricare i componenti](/flow/11-1/guides/download-components/).

## API

### chatgpt.html · version 3

Type: `component`

Invia il testo in arrivo a ChatGPT e restituisce la risposta.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `model` | `String` | no | `gpt-3.5-turbo-instruct` | Modello. Uno tra: `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 |  | Chiave API. |
| `question` | `String` | no |  | Domanda. |

**Ingressi:** `input` (Question).  
**Uscite:** `output` (Answer), `error` (Error).

Questo componente può parlare con ChatGPT.

**Ingresso**

L'ingresso dipende dal modello selezionato

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

**Uscita**

Anche l'uscita dipende dal modello selezionato
- __CPT 3.5 Turbo__ e __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`

Carica contesti Markdown per un modello linguistico.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `path` | `String` | no | `content` | Proprietà del contenuto. |

**Ingressi:** `input` (Input).  
**Uscite:** `output` (Output).

Questo componente può caricare più contesti Markdown per l'LLM. Sostituisce le frasi di testo definite nell'intestazione, come `[filename_defined_in_the_header]`, con il contenuto definito nel contesto.

__Esempio di contesto__:

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

MARKDOWN 1

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

MARKDOWN 2
```

**Utilizzo**

```
[document1.md]
```

__Uscita__:

```
MARKDOWN 1
```

### googlesearch.html · version 1

Type: `component`

Cerca una parola chiave su Google.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `lang` | `String` | no | `en` | Lingua. |
| `limit` | `Number` | no | `5` | Limite dei risultati. |

**Ingressi:** `input` (Input).  
**Uscite:** `output` (Output).

Flow installa il pacchetto npm `google-it` quando aggiungi il componente.

Questo componente può cercare su Google qualsiasi parola chiave tu voglia.

__Configurazione__

- `Language (optional)` : lingua della ricerca;
- `Limit (optional)` : numero massimo di risultati.

__Ingresso__

- `Object` | String : l'ingresso si aspetta `data: String` o `data.text: String` come parole chiave della ricerca.

__Uscita__

- `Array` dei risultati trovati:

### ollamals.html · version 1

Type: `component`

Elenca i modelli di un server Ollama.

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

**Ingressi:** nessuno.  
**Uscite:** nessuna.

Un FlowStream può contenere un solo nodo di questo componente.

Questo componente elenca tutti i modelli di OLLAMA.

### ollamaprompt.html · version 1

Type: `component`

Invia un prompt a un modello Ollama.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `think` | `Boolean` | no | `false` | Ragionamento (thinking). |
| `url` | `String` | no |  | Endpoint di OLLAMA. |
| `model` | `String` | no |  | Modello. |
| `parse` | `Boolean` | no | `false` | Interpreta la risposta come oggetto JSON. |
| `system` | `String` | no |  | Prompt di sistema. |
| `temperature` | `Number` | no | `-1` | Temperatura. |

**Ingressi:** `input` (Prompt).  
**Uscite:** `output` (Response), `error` (Error).

Questo componente invia un prompt al motore OLLAMA.

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

Il componente salva la __risposta__ nella proprietà `response` e l'__errore__ nella proprietà `error`. L'uscita è testo.

### ollamawebsearch.html · version 1

Type: `component`

Cerca sul web con la Ollama Web Search API.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `token` | `String` | no |  | Token API di Ollama. |
| `path` | `String` | no | `response` | Percorso della risposta. |
| `prop` | `String` | no | `search` | Leggi la query di ricerca. |
| `merge` | `Boolean` | no | `false` | Unisci i contenuti. |

**Ingressi:** `input` (Input).  
**Uscite:** `output` (Output), `error` (Error).

Questo componente usa la Ollama Web Search API per fare ricerche sul web. Per l'autenticazione e l'accesso al servizio serve un token API di Ollama valido.

__Payload__:

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

__Risposta__:

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

### opensync.html · version 2

Type: `component`

Riceve dati dall'app OpenSync.

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

**Ingressi:** nessuno.  
**Uscite:** `output` (Output).

Questo componente riceve dati dall'app [OpenSync](https://docs.totaljs.com/opensync/). Esempio di dati:

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

Legge i dati meteo da OpenWeatherMap.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `type` | `String` | no | `current` | Tipo di richiesta. Uno tra: `current` (Current Weather), `forecast` (Forecast). |
| `apikey` | `String` | no |  | Chiave API. |
| `mode` | `String` | no | `json` | Tipo di uscita. Uno tra: `json` (JSON), `xml` (XML), `html` (HTML). |
| `time` | `String` | no | `hourly` | Tempo. Uno tra: `hourly` (Hourly (4 days data)), `daily` (Daily (16 days data)), `climate` (Climate Forecast (30 Days)). |

**Ingressi:** `input` (Input).  
**Uscite:** `output` (Output), `error` (Error).

Questo componente può recuperare i dati meteo da [OpenWheatherMap](https://openweathermap.org/api/);

__Ingresso__:

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