Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use llmified keys for github #751

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions docs/genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions docs/src/components/BuiltinTools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
<LinkCard title="git_log" description="Generates a log of commits." href="/genaiscript/reference/scripts/system#systemgit" />
<LinkCard title="git_status" description="Generates a status of the repository." href="/genaiscript/reference/scripts/system#systemgit" />
<LinkCard title="git_last_tag" description="Gets the last tag." href="/genaiscript/reference/scripts/system#systemgit" />
<LinkCard title="github_actions_workflows_list" description="List all workflows as a list of 'id: name' pair." href="/genaiscript/reference/scripts/system#systemgithub_actions" />
<LinkCard title="github_actions_runs_list" description="List all runs for a workflow. Use 'git_actions_list_workflows' to list workflows." href="/genaiscript/reference/scripts/system#systemgithub_actions" />
<LinkCard title="github_actions_jobs_list" description="List all jobs for a run." href="/genaiscript/reference/scripts/system#systemgithub_actions" />
<LinkCard title="github_actions_workflows_list" description="List all workflows. 'llm_id' is the ID used in other tools." href="/genaiscript/reference/scripts/system#systemgithub_actions" />
<LinkCard title="github_actions_runs_list" description="List all runs for a workflow. 'llm_id' is the ID used in other tools. Use 'git_actions_list_workflows' to list workflows." href="/genaiscript/reference/scripts/system#systemgithub_actions" />
<LinkCard title="github_actions_jobs_list" description="List all jobs for a run. 'llm_id' is the ID used in other tools." href="/genaiscript/reference/scripts/system#systemgithub_actions" />
<LinkCard title="github_actions_job_logs_get" description="Download workflow job log. If the log is too large, use 'github_actions_job_logs_diff' to compare logs." href="/genaiscript/reference/scripts/system#systemgithub_actions" />
<LinkCard title="github_actions_job_logs_diff" description="Diffs two workflow job logsr." href="/genaiscript/reference/scripts/system#systemgithub_actions" />

Check failure on line 27 in docs/src/components/BuiltinTools.mdx

View workflow job for this annotation

GitHub Actions / build

Typo in the word "logsr", should be "logs".
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the word "logsr", should be "logs".

generated by pr-docs-review-commit typo

<LinkCard title="github_files_get" description="Get a file from a repository." href="/genaiscript/reference/scripts/system#systemgithub_files" />
<LinkCard title="github_files_list" description="List all files in a repository." href="/genaiscript/reference/scripts/system#systemgithub_files" />
<LinkCard title="github_issues_list" description="List all issues in a repository." href="/genaiscript/reference/scripts/system#systemgithub_issues" />
<LinkCard title="github_issues_get" description="Get a single issue by number." href="/genaiscript/reference/scripts/system#systemgithub_issues" />
<LinkCard title="github_issues_comments_list" description="Get comments for an issue." href="/genaiscript/reference/scripts/system#systemgithub_issues" />
<LinkCard title="github_pulls_list" description="List all pull requests in a repository." href="/genaiscript/reference/scripts/system#systemgithub_pulls" />
<LinkCard title="github_pulls_get" description="Get a single pull request by number." href="/genaiscript/reference/scripts/system#systemgithub_pulls" />
<LinkCard title="github_pulls_review_comments_list" description="Get review comments for a pull request." href="/genaiscript/reference/scripts/system#systemgithub_pulls" />
<LinkCard title="github_issues_list" description="List all issues in a repository. 'llm_number' is the ID used in other tools." href="/genaiscript/reference/scripts/system#systemgithub_issues" />
<LinkCard title="github_issues_get" description="Get a single issue by number. 'llm_number' is the ID used in other tools." href="/genaiscript/reference/scripts/system#systemgithub_issues" />
<LinkCard title="github_issues_comments_list" description="Get comments for an issue. 'llm_id' is the ID used in other tools." href="/genaiscript/reference/scripts/system#systemgithub_issues" />
<LinkCard title="github_pulls_list" description="List all pull requests in a repository. 'llm_number' is the ID used in other tools." href="/genaiscript/reference/scripts/system#systemgithub_pulls" />
<LinkCard title="github_pulls_get" description="Get a single pull request by number. 'llm_number' is the ID used in other tools." href="/genaiscript/reference/scripts/system#systemgithub_pulls" />
<LinkCard title="github_pulls_review_comments_list" description="Get review comments for a pull request. 'llm_id' is the ID used in other tools." href="/genaiscript/reference/scripts/system#systemgithub_pulls" />
<LinkCard title="math_eval" description="Evaluates a math expression" href="/genaiscript/reference/scripts/system#systemmath" />
<LinkCard title="md_read_frontmatter" description="Reads the frontmatter of a markdown or MDX file." href="/genaiscript/reference/scripts/system#systemmd_frontmatter" />
<LinkCard title="python_code_interpreter_run" description="Executes python 3.12 code for Data Analysis tasks in a docker container. The process output is returned. Do not generate visualizations. The only packages available are numpy, pandas, scipy. There is NO network connectivity. Do not attempt to install other packages or make web requests." href="/genaiscript/reference/scripts/system#systempython_code_interpreter" />
Expand Down
70 changes: 40 additions & 30 deletions docs/src/content/docs/reference/scripts/system.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -961,11 +961,11 @@

Queries results from workflows in GitHub actions.

- tool `github_actions_workflows_list`: List all workflows as a list of 'id: name' pair.
- tool `github_actions_runs_list`: List all runs for a workflow. Use 'git_actions_list_workflows' to list workflows.
- tool `github_actions_jobs_list`: List all jobs for a run.
- tool `github_actions_workflows_list`: List all workflows. 'llm_id' is the ID used in other tools.
- tool `github_actions_runs_list`: List all runs for a workflow. 'llm_id' is the ID used in other tools. Use 'git_actions_list_workflows' to list workflows.
- tool `github_actions_jobs_list`: List all jobs for a run. 'llm_id' is the ID used in other tools.
- tool `github_actions_job_logs_get`: Download workflow job log. If the log is too large, use 'github_actions_job_logs_diff' to compare logs.
- tool `github_actions_job_logs_diff`: Diffs two workflow job logsr.

Check failure on line 968 in docs/src/content/docs/reference/scripts/system.mdx

View workflow job for this annotation

GitHub Actions / build

Typo in the word "logsr", should be "logs".
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the word "logsr", should be "logs".

generated by pr-docs-review-commit typo


`````js wrap title="system.github_actions"
system({
Expand All @@ -975,22 +975,22 @@

defTool(
"github_actions_workflows_list",
"List all workflows as a list of 'id: name' pair.",
"List all workflows. 'llm_id' is the ID used in other tools.",
{},
async (args) => {
const { context } = args
context.log("github action list workflows")
const res = await github.listWorkflows()
return CSV.stringify(
res.map(({ id, name, path }) => ({ id, name, path })),
res.map(({ llm_id, name, path }) => ({ llm_id, name, path })),

Check failure on line 985 in docs/src/content/docs/reference/scripts/system.mdx

View workflow job for this annotation

GitHub Actions / build

The variable 'llm_id' should be 'id' to match the context and the rest of the documentation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'llm_id' should be 'id' to match the context and the rest of the documentation.

generated by pr-docs-review-commit incorrect_variable

{ header: true }
)
}
)

defTool(
"github_actions_runs_list",
"List all runs for a workflow. Use 'git_actions_list_workflows' to list workflows.",
"List all runs for a workflow. 'llm_id' is the ID used in other tools. Use 'git_actions_list_workflows' to list workflows.",
{
type: "object",
properties: {
Expand Down Expand Up @@ -1020,9 +1020,9 @@
status,
})
return CSV.stringify(
res.map(({ id, name, conclusion, head_sha }) => ({
id,
res.map(({ llm_id, name, conclusion, head_sha }) => ({
llm_id,
name,

Check failure on line 1025 in docs/src/content/docs/reference/scripts/system.mdx

View workflow job for this annotation

GitHub Actions / build

The variable 'llm_id' should be 'id' to match the context and the rest of the documentation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'llm_id' should be 'id' to match the context and the rest of the documentation.

generated by pr-docs-review-commit incorrect_variable

conclusion,
head_sha,
})),
Expand All @@ -1033,7 +1033,7 @@

defTool(
"github_actions_jobs_list",
"List all jobs for a run.",
"List all jobs for a run. 'llm_id' is the ID used in other tools.",
{
type: "object",
properties: {
Expand All @@ -1050,7 +1050,11 @@
context.log(`github action list jobs for run ${run_id}`)
const res = await github.listWorkflowJobs(run_id)
return CSV.stringify(
res.map(({ id, name, status }) => ({ id, name, status })),
res.map(({ llm_id, name, status }) => ({
llm_id,
name,
status,
})),

Check failure on line 1057 in docs/src/content/docs/reference/scripts/system.mdx

View workflow job for this annotation

GitHub Actions / build

The variable 'llm_id' should be 'id' to match the context and the rest of the documentation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'llm_id' should be 'id' to match the context and the rest of the documentation.

generated by pr-docs-review-commit incorrect_variable

{ header: true }
)
}
Expand Down Expand Up @@ -1183,9 +1187,9 @@



- tool `github_issues_list`: List all issues in a repository.
- tool `github_issues_get`: Get a single issue by number.
- tool `github_issues_comments_list`: Get comments for an issue.
- tool `github_issues_list`: List all issues in a repository. 'llm_number' is the ID used in other tools.
- tool `github_issues_get`: Get a single issue by number. 'llm_number' is the ID used in other tools.
- tool `github_issues_comments_list`: Get comments for an issue. 'llm_id' is the ID used in other tools.

`````js wrap title="system.github_issues"
system({
Expand All @@ -1194,7 +1198,7 @@

defTool(
"github_issues_list",
"List all issues in a repository.",
"List all issues in a repository. 'llm_number' is the ID used in other tools.",
{
type: "object",
properties: {
Expand Down Expand Up @@ -1223,15 +1227,19 @@
context.log(`github issue list ${state ?? "all"}`)
const res = await github.listIssues({ state, labels, sort, direction })
return CSV.stringify(
res.map(({ number, title, state }) => ({ number, title, state })),
res.map(({ llm_number, title, state }) => ({
llm_number,
title,
state,
})),

Check failure on line 1234 in docs/src/content/docs/reference/scripts/system.mdx

View workflow job for this annotation

GitHub Actions / build

The variable 'llm_number' should be 'number' to match the context and the rest of the documentation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'llm_number' should be 'number' to match the context and the rest of the documentation.

generated by pr-docs-review-commit incorrect_variable

{ header: true }
)
}
)

defTool(
"github_issues_get",
"Get a single issue by number.",
"Get a single issue by number. 'llm_number' is the ID used in other tools.",
{
type: "object",
properties: {
Expand All @@ -1245,10 +1253,10 @@
async (args) => {
const { number: issue_number, context } = args
context.log(`github issue get ${issue_number}`)
const { number, title, body, state, html_url, reactions } =
const { llm_number, title, body, state, html_url, reactions } =
await github.getIssue(issue_number)
return YAML.stringify({
number,
llm_number,

Check failure on line 1259 in docs/src/content/docs/reference/scripts/system.mdx

View workflow job for this annotation

GitHub Actions / build

The variable 'llm_number' should be 'number' to match the context and the rest of the documentation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'llm_number' should be 'number' to match the context and the rest of the documentation.

generated by pr-docs-review-commit incorrect_variable

title,
body,
state,
Expand All @@ -1260,7 +1268,7 @@

defTool(
"github_issues_comments_list",
"Get comments for an issue.",
"Get comments for an issue. 'llm_id' is the ID used in other tools.",
{
type: "object",
properties: {
Expand All @@ -1276,11 +1284,11 @@
context.log(`github issue list comments ${issue_number}`)
const res = await github.listIssueComments(issue_number)
return CSV.stringify(
res.map(({ id, body, updated_at }) => ({
id,
res.map(({ llm_id, body, updated_at }) => ({
llm_id,
body,
updated_at,
})),

Check failure on line 1291 in docs/src/content/docs/reference/scripts/system.mdx

View workflow job for this annotation

GitHub Actions / build

The variable 'llm_id' should be 'id' to match the context and the rest of the documentation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'llm_id' should be 'id' to match the context and the rest of the documentation.

generated by pr-docs-review-commit incorrect_variable

{ header: true }
)
}
Expand All @@ -1295,9 +1303,9 @@



- tool `github_pulls_list`: List all pull requests in a repository.
- tool `github_pulls_get`: Get a single pull request by number.
- tool `github_pulls_review_comments_list`: Get review comments for a pull request.
- tool `github_pulls_list`: List all pull requests in a repository. 'llm_number' is the ID used in other tools.
- tool `github_pulls_get`: Get a single pull request by number. 'llm_number' is the ID used in other tools.
- tool `github_pulls_review_comments_list`: Get review comments for a pull request. 'llm_id' is the ID used in other tools.

`````js wrap title="system.github_pulls"
system({
Expand All @@ -1306,7 +1314,7 @@

defTool(
"github_pulls_list",
"List all pull requests in a repository.",
"List all pull requests in a repository. 'llm_number' is the ID used in other tools.",
{
type: "object",
properties: {
Expand Down Expand Up @@ -1335,11 +1343,12 @@
context.log(`github pull list`)
const res = await github.listPullRequests({ state, sort, direction })
return CSV.stringify(
res.map(({ number, title, state, body }) => ({
res.map(({ number, llm_number, title, state, body }) => ({
number,
llm_number,
title,
state,
})),

Check failure on line 1351 in docs/src/content/docs/reference/scripts/system.mdx

View workflow job for this annotation

GitHub Actions / build

The variable 'llm_number' should be 'number' to match the context and the rest of the documentation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'llm_number' should be 'number' to match the context and the rest of the documentation.

generated by pr-docs-review-commit incorrect_variable

{ header: true }
)
}
Expand All @@ -1347,7 +1356,7 @@

defTool(
"github_pulls_get",
"Get a single pull request by number.",
"Get a single pull request by number. 'llm_number' is the ID used in other tools.",
{
type: "object",
properties: {
Expand All @@ -1361,12 +1370,13 @@
async (args) => {
const { number: pull_number, context } = args
context.log(`github pull get ${pull_number}`)
const { number, title, body, state, html_url, reactions } =
const { number, llm_number, title, body, state, html_url, reactions } =
await github.getPullRequest(pull_number)
return YAML.stringify({
number,
llm_number,
title,
body,

Check failure on line 1379 in docs/src/content/docs/reference/scripts/system.mdx

View workflow job for this annotation

GitHub Actions / build

The variable 'llm_number' should be 'number' to match the context and the rest of the documentation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'llm_number' should be 'number' to match the context and the rest of the documentation.

generated by pr-docs-review-commit incorrect_variable

state,
html_url,
reactions,
Expand All @@ -1376,7 +1386,7 @@

defTool(
"github_pulls_review_comments_list",
"Get review comments for a pull request.",
"Get review comments for a pull request. 'llm_id' is the ID used in other tools.",
{
type: "object",
properties: {
Expand All @@ -1393,7 +1403,7 @@
context.log(`github pull comments list ${pull_number}`)
const res = await github.listPullRequestReviewComments(pull_number)
return CSV.stringify(
res.map(({ id, body }) => ({ id, body })),
res.map(({ id, llm_id, body }) => ({ id, llm_id, body })),
{ header: true }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'llm_id' should be 'id' to match the context and the rest of the documentation.

generated by pr-docs-review-commit incorrect_variable

)
}
Expand Down
13 changes: 10 additions & 3 deletions genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading