Problem/Motivation

With Drupal 1.1.x tools calling and structured responses is added. This has been added for example in OpenAI, see https://git.drupalcode.org/project/ai_provider_openai/-/blob/1.1.x/src/P....

We need to add this possibility for every possible provider that allows for it.

Documentation exists here:

Proposed resolution

  1. Enable structured response in the Anthropic provider.
  2. Enable tool calling in Anthropic provider.
  3. Update composer.json to using AI 1.1.x
CommentFileSizeAuthor
#4 anthropic-sdk-php-tools.patch1.42 KBseogow
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

marcus_johansson created an issue. See original summary.

seogow made their first commit to this issue’s fork.

seogow’s picture

Assigned: Unassigned » seogow
seogow’s picture

StatusFileSize
new1.42 KB

The code is updated. Unfortunately, wpai-inc/anthropic-sdk-php doesn't allow for tools (last commit was 7 months ago), so we either change the library, or (I would recommend) fork it with our patch (attached).

marcus_johansson’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.