Spaces:
Sleeping
Sleeping
Download constants.py from Anustup/GitChatIssue: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/spaces/Anustup/GitChatIssue/resolve/main/constants.py
- Command line
-
hf download hf://spaces/Anustup/GitChatIssue/constants.py
-
curl -L -o constants.py https://huggingface.co/spaces/Anustup/GitChatIssue/resolve/main/constants.py
1.1 kB
| import os | |
| # OPENAI | |
| OPENAI_API_BASE_URL = "https://api.openai.com/v1" | |
| OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") | |
| TEXT_MODEL_ENGINE = 'gpt-4-0125-preview' | |
| # GITHUB | |
| GITHUB_AUTH_KEY = os.getenv("GITHUB_AUTH_KEY") | |
| # REGEX | |
| REPO_NAME_EXTRACTION_PATTERN = r"https://github.com/([^/]+)/([^/]+)$" | |
| # SCHEMA | |
| JSON_SCHEMA_FOR_GPT = { | |
| "type": "object", | |
| "properties": { | |
| "issues": { | |
| "type": "array", | |
| "items": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "issue_title": { | |
| "type": "string" | |
| }, | |
| "rating": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string" | |
| }, | |
| "description": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "description" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "issue_title", | |
| "rating" | |
| ] | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "issues" | |
| ] | |
| } |