100XZX001 commited on
Commit
f951d64
·
verified ·
1 Parent(s): 3215054

Update models.py

Browse files
Files changed (1) hide show
  1. models.py +8 -4
models.py CHANGED
@@ -2,21 +2,25 @@ from pydantic import BaseModel
2
  from typing import List, Optional
3
 
4
  class Observation(BaseModel):
5
- pr_code: str
6
- comments: List[str]
 
 
7
  agent_comment: Optional[str] = None
8
  step: int = 0
9
  done: bool = False
10
 
11
  class Action(BaseModel):
12
- action_type: str # "write_comment", "skip", "done"
13
  comment_text: Optional[str] = None
14
 
15
  class Reward(BaseModel):
16
  value: float
17
 
18
  class State(BaseModel):
19
- pr_code: str
 
 
20
  comments: List[str]
21
  agent_comment: Optional[str]
22
  step: int
 
2
  from typing import List, Optional
3
 
4
  class Observation(BaseModel):
5
+ pr_title: str # title of the pull request
6
+ pr_description: str # description of the change
7
+ code_snippet: str # the code under review
8
+ comments: List[str] # existing comments
9
  agent_comment: Optional[str] = None
10
  step: int = 0
11
  done: bool = False
12
 
13
  class Action(BaseModel):
14
+ action_type: str # "write_comment", "skip", "done"
15
  comment_text: Optional[str] = None
16
 
17
  class Reward(BaseModel):
18
  value: float
19
 
20
  class State(BaseModel):
21
+ pr_title: str
22
+ pr_description: str
23
+ code_snippet: str
24
  comments: List[str]
25
  agent_comment: Optional[str]
26
  step: int