Spaces:
Runtime error
Runtime error
Download codeinterpreterapi/schema/response.py from brzhang/codeinterpreter: direct link, hf CLI and curl.
- Browser
- Download file 629 Bytes
-
https://huggingface.co/spaces/brzhang/codeinterpreter/resolve/f4875a19a77bf164ed2199a2df3de9f04ea009d2/codeinterpreterapi/schema/response.py
- Command line
-
hf download hf://spaces/brzhang/codeinterpreter@f4875a19a77bf164ed2199a2df3de9f04ea009d2/codeinterpreterapi/schema/response.py
-
curl -L -o response.py https://huggingface.co/spaces/brzhang/codeinterpreter/resolve/f4875a19a77bf164ed2199a2df3de9f04ea009d2/codeinterpreterapi/schema/response.py
629 Bytes
| from langchain.schema import HumanMessage, AIMessage # type: ignore | |
| from .file import File | |
| class UserRequest(HumanMessage): | |
| files: list[File] = [] | |
| def __str__(self): | |
| return self.content | |
| def __repr__(self): | |
| return f"UserRequest(content={self.content}, files={self.files})" | |
| class CodeInterpreterResponse(AIMessage): | |
| files: list[File] = [] | |
| # final_code: str = "" TODO: implement | |
| # final_output: str = "" TODO: implement | |
| def __str__(self): | |
| return self.content | |
| def __repr__(self): | |
| return f"CodeInterpreterResponse(content={self.content}, files={self.files})" | |