on main help sign in
fix: Expose Required params to Anthropic API (#752)
a02bd99Evan
.github/workflows/cla.yml+1−1
@@ -31,6 +31,6 @@ jobs:
31 branch: "main"
31 branch: "main"
32 allowlist: charmcli,charmcrush,dependabot[bot]
32 allowlist: charmcli,charmcrush,dependabot[bot]
33 custom-pr-sign-comment: "I have read the Contributor License Agreement (CLA) and hereby sign the CLA."
33 custom-pr-sign-comment: "I have read the Contributor License Agreement (CLA) and hereby sign the CLA."
34− custom-notsigned-precomment: "Thank you for your submission. We really appreciate it! Like many open-source projects, we ask that you sign our [Contributor License Agreement](https://github.com/charmbracelet/crush/blob/main/CLA.md) before we can accept your contribution. You can sign the CLA by just posting a Pull Request comment same as the below format."
34+ custom-notsigned-prcomment: "Thank you for your submission. We really appreciate it! Like many open-source projects, we ask that you sign our [Contributor License Agreement](https://github.com/charmbracelet/crush/blob/main/CLA.md) before we can accept your contribution. You can sign the CLA by just posting a Pull Request comment same as the below format."
35 lock-pullrequest-aftermerge: false
35 lock-pullrequest-aftermerge: false
36 signed-commit-message: "chore(legal): @$contributorName has signed the CLA"
36 signed-commit-message: "chore(legal): @$contributorName has signed the CLA"
Taskfile.yaml+9
@@ -28,6 +28,13 @@ tasks:
28 env:
28 env:
29 GOEXPERIMENT: null
29 GOEXPERIMENT: null
30
30
31+ build:
32+ desc: Run build
33+ cmds:
34+ - go build .
35+ generates:
36+ - crush
37+
31 test:
38 test:
32 desc: Run tests
39 desc: Run tests
33 cmds:
40 cmds:
@@ -70,3 +77,5 @@ tasks:
70 cmds:
77 cmds:
71 - go run main.go schema > schema.json
78 - go run main.go schema > schema.json
72 - echo "Generated schema.json"
79 - echo "Generated schema.json"
80+ generates:
81+ - schema.json
internal/llm/provider/anthropic.go+1−1
@@ -178,7 +178,7 @@ func (a *anthropicClient) convertTools(tools []tools.BaseTool) []anthropic.ToolU
178 Description: anthropic.String(info.Description),
178 Description: anthropic.String(info.Description),
179 InputSchema: anthropic.ToolInputSchemaParam{
179 InputSchema: anthropic.ToolInputSchemaParam{
180 Properties: info.Parameters,
180 Properties: info.Parameters,
181− // TODO: figure out how we can tell claude the required fields?
181+ Required: info.Required,
182 },
182 },
183 }
183 }
184
184