# text_to_docs

> **Function** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/telegram/text_to_docs)

Convert a string or list of strings to a list of Documents with metadata.

## Signature

```python
text_to_docs(
    text: Union[str, List[str]],
) -> List[Document]
```

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/document_loaders/telegram.py#L49)