> For the complete documentation index, see [llms.txt](https://docs.mluvii.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mluvii.com/pro-it-specialisty/napojeni-chatbotu/api-chatbot/udalosti-specificke-pro-chatbot-api.md).

# Události specifické pro Chatbot API

Tyto aktivity a události jsou relevantní pouze pro API chatboty. Microsoft Bot Framework tyto funkcionality implementuje v rámci [Direct Line API](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-directline).

## Text

Pošle textovou zprávu s časovou stopou. Pro WebChat, Facebook a WhatsApp lze použít formátování textu - vzhledem k tomu, že různé kanály používají různé druhy formátování, zavedli jsme automatickou konverzi u nás v aplikaci a do mluvii stačí poslat vždy html elementy. Povolené jsou následující tagy: `<strong>` `<em>` `<a>`.

Ostatní kanály jsou všech ostatních tagů zbaveny a ignorovány.

U Apple kanálu lze použít `´n´` pro nový řádek.

### **Jednoduchá textová zpráva:**

```json
{
  "sessionId": <long>,
  "type": "mluvii",
  "timestamp": "2020-09-09T10:03:53.4976861+02:00",
  "text": "Simple sample"
}
```

### **Formátovaná textová zpráva:**

```json
{
  "sessionId": <long>,
  "type": "mluvii",
  "timestamp": "2020-09-09T10:03:53.4976861+02:00",
  "text": "<em>Italic part</em>, <strong>Bold part</strong>"
}
```

## Události

### Příchozí zpráva

Když klient odešle textovou zprávu do chatu, na callback url přijde následující aktivita:

```json
{
  "sessionId": <long>,
  "activity": "Text",
  "text": "Hello world"
}
```

### Příchozí soubor

Pokud klient nahraje soubor pomocí sponky v inputu chatu, přijde na bota Activita v následujícím formátu.

```json
{
  "activity": "GuestFileUpload",
  "fileUrl": <string>, (URL souboru nahraného uživatelem)
}
```


---

# 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.mluvii.com/pro-it-specialisty/napojeni-chatbotu/api-chatbot/udalosti-specificke-pro-chatbot-api.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.
