This commit is contained in:
mrT23
2024-07-11 18:37:37 +03:00
parent eccd00b86f
commit 034ec8f53a
5 changed files with 74 additions and 12 deletions

View File

@ -11,6 +11,7 @@ from enum import Enum
from typing import Any, List, Tuple
import yaml
from pydantic import BaseModel
from starlette_context import context
from pr_agent.algo import MAX_TOKENS
@ -19,6 +20,12 @@ from pr_agent.config_loader import get_settings, global_settings
from pr_agent.algo.types import FilePatchInfo
from pr_agent.log import get_logger
class Range(BaseModel):
line_start: int # should be 0-indexed
line_end: int
column_start: int = -1
column_end: int = -1
class ModelType(str, Enum):
REGULAR = "regular"
TURBO = "turbo"