humanify icon indicating copy to clipboard operation
humanify copied to clipboard

[Idea] Adding Anthropic as a provider

Open nicoandmee opened this issue 1 year ago • 5 comments

Hi, great project. I think it would be beneficial to have Anthropic/Claude as a provider, in addition to Gemini and openAI. Anthropic has the best performance on code-adjacent tasks if memory serves. If this is in line with your desires, please permit me to introduce the changes required.

Thanks!

nicoandmee avatar Nov 17 '24 01:11 nicoandmee

Sounds really good! I wonder if Claude api has a way to force output to a structured format like OpenAI does? I think it's quite essential for the tool to work reliably

jehna avatar Nov 17 '24 08:11 jehna

Hmm . I think this could do: https://docs.anthropic.com/en/docs/build-with-claude/tool-use#controlling-claudes-output

jehna avatar Nov 17 '24 08:11 jehna

Hello, Anthropic user here, I made a PR (#272) to integrate it as a plugin for humanify. I created a tool to force the output structure as you suggested @jehna.

ktx-mega avatar Jan 09 '25 15:01 ktx-mega

I think this could do: docs.anthropic.com/en/docs/build-with-claude/tool-use#controlling-claudes-output

Also just saw this page:

  • https://docs.anthropic.com/en/docs/build-with-claude/tool-use/token-efficient-tool-use
    • Token-efficient tool use (beta) The upgraded Claude 3.7 Sonnet model is capable of calling tools in a token-efficient manner. Requests save an average of 14% in output tokens, up to 70%, which also reduces latency. Exact token reduction and latency improvements depend on the overall response shape and size.

    • Token-efficient tool use is a beta feature. Please make sure to evaluate your responses before using it in production.

    • If you choose to experiment with this feature, we recommend using the Prompt Improver in the Console to improve your prompt.

      • https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/prompt-generator
      • https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/prompt-improver
    • Token-efficient tool use does not currently work with disable_parallel_tool_use.

    • To use this beta feature, simply add the beta header token-efficient-tools-2025-02-19 to a tool use request with claude-3-7-sonnet-20250219. If you are using the SDK, ensure that you are using the beta SDK with anthropic.beta.messages.

0xdevalias avatar Mar 12 '25 03:03 0xdevalias

See also:

  • https://github.com/jehna/humanify/issues/400

0xdevalias avatar Apr 10 '25 06:04 0xdevalias