Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Update GPT model to resolve API validation error
Problem
The D-ID Agents API was returning a validation error when creating new agents:
{ "kind": "ValidationError", "description": "validation failed", "details": { "payload.llm": { "message": "Could not match the union against any of the items. Issues: [{\"payload.llm.model\":{\"message\":\"should be one of the following; ['gpt-35-turbo','gpt-4o-global','gpt-4o-mini']\",\"value\":\"gpt-3.5-turbo-1106\"}}]" } } }Root Cause
The code was using the deprecated GPT model
gpt-3.5-turbo-1106, which is no longer supported by the D-ID API. The API now only accepts:gpt-35-turbogpt-4o-globalgpt-4o-miniSolution
Updated the LLM configuration in the
agentsAPIworkflow()function to usegpt-4o-miniinstead of the deprecated model.Changes
agents-client-api.jsmodel: 'gpt-3.5-turbo-1106'→model: 'gpt-4o-mini'Testing
Impact
This fix resolves the "Create new Agent with Knowledge" functionality that was previously failing due to the outdated model configuration.
closes #68