File size: 3,592 Bytes
1278b3f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ccded5c
1278b3f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
tools = [
    {
        "type": "function",
        "function": {
            "name": "fetch_github_issue",
            "description": "Fetch GitHub issue details",
            "parameters": {
                "type": "object",
                "properties": {
                    "issue_url": {
                        "type": "string",
                        "description": "The full URL of the GitHub issue"
                    }
                },
                "required": ["issue_url"]
            },
        },
    },
    {
        "type": "function",
        "function": {
            "name": "get_issue_details",
            "description": "Get details of a GitHub issue",
            "parameters": {
                "type": "object",
                "properties": {
                    "owner": {
                        "type": "string",
                        "description": "The owner of the repository."
                    },
                    "repo": {
                        "type": "string",
                        "description": "The name of the repository."
                    },
                    "issue_num": {
                        "type": "string",
                        "description": "The issue number."
                    }
                },
                "required": ["owner", "repo", "issue_num"],
            },
        },
    },
    {
        "type": "function",
        "function": {
            "name": "retrieve_context",
            "description": "Fetch relevant context from codebase for a GitHub issue",
            "parameters": {
                "type": "object",
                "properties": {
                    "owner": {
                        "type": "string",
                        "description": "The owner of the repository."
                    },
                    "repo": {
                        "type": "string",
                        "description": "The name of the repository."
                    },
                    "ref": {
                        "type": "string",
                        "description": "The branch reference from either master or main to index from."
                    },
                    "issue_description": {
                        "type": "string",
                        "description": "The exact issue description from the issue the agent is resolving. Must be passed without rephrasing."
                    }
                },
                "required": ["owner", "repo", "ref", "issue_description"]
            },
        },
    },
    {
        "type": "function",
        "function": {
            "name": "post_comment",
            "description": "Post a comment on a GitHub issue",
            "parameters": {
                "type": "object",
                "properties": {
                    "owner": {
                        "type": "string",
                        "description": "The owner of the repository."
                    },
                    "repo": {
                        "type": "string",
                        "description": "The name of the repository."
                    },
                    "issue_num": {
                        "type": "string",
                        "description": "The issue number."
                    },
                    "comment_body": {
                        "type": "string",
                        "description": "The body of the comment."
                    }
                },
                "required": ["owner", "repo", "issue_num", "comment_body"],
            },
        },
    },
]