Spaces:
Sleeping
Sleeping
Download src/models.py from mrfirdauss/QALocalLLM: direct link, hf CLI and curl.
- Browser
- Download file 848 Bytes
-
https://huggingface.co/spaces/mrfirdauss/QALocalLLM/resolve/main/src/models.py
- Command line
-
hf download hf://spaces/mrfirdauss/QALocalLLM/src/models.py
-
curl -L -o models.py https://huggingface.co/spaces/mrfirdauss/QALocalLLM/resolve/main/src/models.py
848 Bytes
| from pydantic import BaseModel, Field | |
| class ResponseState(BaseModel): | |
| isNeedContext: bool = Field(default=False, description="Whether the model needs additional context from data from or pdf") | |
| response: str = Field(default="", description="The response from the model") | |
| contextType: str = Field(default="", description="If isNeedContext true then The type of context needed, e.g., 'data' or 'pdf' or 'both'") | |
| retriverKey: str = Field(default="", description="If isNeedContext true and contextType is pdf or both then The key to use to retrieve the context from the pdf for vector db. The key is in plain text.") | |
| code: str = Field(default="", description="The data already loaded in a dataframe named df, you only need to write code to gain insights from the data. Insert all necessary info inside string variable named result") |