> For the complete documentation index, see [llms.txt](https://docs.opencityitalia.it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opencityitalia.it/architettura-e-funzionalita-del-chatbot/chatbot-per-la-pa/interagire-con-il-chatbot.md).

# Interagire con il chatbot

{% hint style="info" %}
Vuoi provare OpenCity AI Chatbot? L'assistente virtuale di OpenCity è testabile sul portale istituzionale del [Comune di Vicopisano](https://www.comune.vicopisano.pi.it/).
{% endhint %}

## Attivare il chatbot

Il widget del chatbot è presente su tutte le pagine del sito web. Il cittadino può attivarlo in qualsiasi momento della navigazione.

<figure><img src="/files/aMXs5US81cz6S45cHeeU" alt=""><figcaption></figcaption></figure>

Per attivarlo, l'utente clicca sul logo in basso e conferma di aver letto l'informativa privacy del Comune.

<div><figure><img src="/files/jGklL4OHVDFO4Al8pZf9" alt=""><figcaption></figcaption></figure> <figure><img src="/files/2msWpkXSpUnCFsOjaXYn" alt=""><figcaption></figcaption></figure></div>

## Iniziare la conversazione

Una volta aperta la chat, il cittadino può:

* selezionare uno degli argomenti predefiniti (1);
* inserire manualmente la propria richiesta o indicare l'argomento che vuole approfondire (2).

<figure><img src="/files/vVOcos1GsOnC2e83mwkr" alt=""><figcaption></figcaption></figure>

## Consultare risposte e fonti

Insieme alla risposta, il sistema propone anche i link alle fonti. Rimanda a pagine del sito strettamente collegate alla domanda o all'argomento inserito.

<figure><img src="/files/QRLbu05tHkyA7sxbSXp0" alt=""><figcaption></figcaption></figure>

## Affinare la richiesta

Se i contenuti suggeriti non sono quelli cercati, il cittadino può proseguire il dialogo. Inserendo una nuova richiesta, o specificando meglio l'argomento, ottiene una risposta più precisa.

<figure><img src="/files/4onImXR1F5QNWkjiWeZb" alt=""><figcaption></figcaption></figure>

## Riprendere una sessione salvata

In caso di chiusura improvvisa o apertura di nuove schede, la sessione viene salvata automaticamente per garantirti la massima continuità del dialogo: potrai riprendere il filo del discorso esattamente da dove lo avevi lasciato, senza perdere lo storico della conversazione.

<div><figure><img src="/files/rUGFBMpxJZZMQIlKrpMJ" alt=""><figcaption></figcaption></figure> <figure><img src="/files/b7g33bagSJK4qqjsh6Ef" alt=""><figcaption></figcaption></figure></div>

## Gestire la scadenza della sessione

In caso di scadenza della sessione, l'utente viene avvertito attraverso un messaggio del chatbot.

<figure><img src="/files/yAjZKmGsHkF5oLYsj6R6" alt=""><figcaption></figcaption></figure>

E' comunque possibile resettare la sessione e iniziarne una nuova tramite pulsante apposito

<figure><img src="/files/lX5m74FJJUY8s47zi6Yq" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.opencityitalia.it/architettura-e-funzionalita-del-chatbot/chatbot-per-la-pa/interagire-con-il-chatbot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
