go-coder
A generated module for GoCoder functions
Installation
dagger install github.com/kpenfound/agents/go-coder@1f6d0384df41f1328f93c53ae38807e3f965ce22
Entrypoint
Return Type
GoCoder
Example
dagger -m github.com/kpenfound/agents/go-coder@1f6d0384df41f1328f93c53ae38807e3f965ce22 call \
func (m *myModule) example() *GoCoder {
return dag.
GoCoder()
}
@function
def example() -> dag.GoCoder:
return (
dag.go_coder()
)
@func()
example(): GoCoder {
return dag
.goCoder()
}
Types
GoCoder 🔗
assignment() 🔗
Ask a go-coder to complete a task and get the Container with the completed task
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
task | String ! | - | The task to complete |
Example
dagger -m github.com/kpenfound/agents/go-coder@1f6d0384df41f1328f93c53ae38807e3f965ce22 call \
assignment --task string
func (m *myModule) example(task string) *Container {
return dag.
GoCoder().
Assignment(task)
}
@function
def example(task: str) -> dagger.Container:
return (
dag.go_coder()
.assignment(task)
)
@func()
example(task: string): Container {
return dag
.goCoder()
.assignment(task)
}
solveIssue() 🔗
Returns a container that echoes whatever string argument is provided
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
githubToken | Secret ! | - | Github authentication token |
repo | String ! | - | Github repository with an issue to solve |
issueId | Integer ! | - | Issue number to solve |
model | String | - | LLM Model |
Example
dagger -m github.com/kpenfound/agents/go-coder@1f6d0384df41f1328f93c53ae38807e3f965ce22 call \
solve-issue --github-token env:MYSECRET --repo string --issue-id integer
func (m *myModule) example(ctx context.Context, githubToken *Secret, repo string, issueId int) string {
return dag.
GoCoder().
SolveIssue(ctx, githubToken, repo, issueId)
}
@function
async def example(github_token: dagger.Secret, repo: str, issue_id: int) -> str:
return await (
dag.go_coder()
.solve_issue(github_token, repo, issue_id)
)
@func()
async example(githubToken: Secret, repo: string, issueId: number): Promise<string> {
return dag
.goCoder()
.solveIssue(githubToken, repo, issueId)
}
prFeedback() 🔗
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
githubToken | Secret ! | - | Github authentication token |
repo | String ! | - | Github repository with an issue to solve |
prNumber | Integer ! | - | PR number to iterate on |
feedback | String ! | - | PR feedback |
model | String | - | LLM Model |
Example
dagger -m github.com/kpenfound/agents/go-coder@1f6d0384df41f1328f93c53ae38807e3f965ce22 call \
pr-feedback --github-token env:MYSECRET --repo string --pr-number integer --feedback string
func (m *myModule) example(ctx context.Context, githubToken *Secret, repo string, prNumber int, feedback string) string {
return dag.
GoCoder().
PrFeedback(ctx, githubToken, repo, prNumber, feedback)
}
@function
async def example(github_token: dagger.Secret, repo: str, pr_number: int, feedback: str) -> str:
return await (
dag.go_coder()
.pr_feedback(github_token, repo, pr_number, feedback)
)
@func()
async example(githubToken: Secret, repo: string, prNumber: number, feedback: string): Promise<string> {
return dag
.goCoder()
.prFeedback(githubToken, repo, prNumber, feedback)
}