# agenerate_with_last_element_mark

> **Function** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/llms/tongyi/agenerate_with_last_element_mark)

Generate elements from an async iterable,
and a boolean indicating if it is the last element.

## Signature

```python
agenerate_with_last_element_mark(
    iterable: AsyncIterable[T],
) -> AsyncIterator[Tuple[T, bool]]
```

---

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