Skip to content

Commit

Permalink
fix: prompt playground claude (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt authored Sep 12, 2024
1 parent a2d1237 commit 105a3f6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/frontend/components/prompts/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,19 @@ export default function ProviderEditor({

let updatedTools = value.config.tools;

if (isPreviousProviderOpenAI && isNewProviderAnthropic) {
if (
isPreviousProviderOpenAI &&
isNewProviderAnthropic &&
value.config.tools
) {
updatedTools = convertOpenAIToolsToAnthropic(
value.config.tools,
);
} else if (isPreviousProviderAnthropic && isNewProviderOpenAI) {
} else if (
isPreviousProviderAnthropic &&
isNewProviderOpenAI &&
value.config.tools
) {
updatedTools = convertAnthropicToolsToOpenAI(
value.config.tools,
);
Expand Down

0 comments on commit 105a3f6

Please sign in to comment.