Download data/copilotj/core/message.py from introvoyz045/CopilotJ: direct link, hf CLI and curl.
- Browser
- Download file 530 Bytes
-
https://huggingface.co/datasets/introvoyz045/CopilotJ/resolve/main/data/copilotj/core/message.py
- Command line
-
hf download hf://datasets/introvoyz045/CopilotJ/data/copilotj/core/message.py
-
curl -L -o message.py https://huggingface.co/datasets/introvoyz045/CopilotJ/resolve/main/data/copilotj/core/message.py
530 Bytes
| # SPDX-FileCopyrightText: Copyright contributors to the CopilotJ project. | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| from typing import Literal | |
| import pydantic | |
| __all__ = ["TextMessage", "ImageMessage", "HandoffMessage"] | |
| class TextMessage(pydantic.BaseModel): | |
| role: Literal["assistant", "system", "user"] | |
| text: str | |
| class ImageMessage(pydantic.BaseModel): | |
| role: Literal["assistant", "system", "user"] | |
| image: str | |
| class HandoffMessage(pydantic.BaseModel): | |
| target: str | |
| message: TextMessage | ImageMessage | |