Skip to content

Commit

Permalink
Merge pull request #1293 from ai16z/patch/handle_provider
Browse files Browse the repository at this point in the history
fix: add missing claude vertex case to handleProvider
  • Loading branch information
shakkernerd authored Dec 21, 2024
2 parents 907c5a5 + 0eb98a3 commit dfab4c1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/core/src/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1066,8 +1066,12 @@ export const generateImage = async (
num_inference_steps: modelSettings?.steps ?? 50,
guidance_scale: data.guidanceScale || 3.5,
num_images: data.count,
enable_safety_checker: runtime.getSetting("FAL_AI_ENABLE_SAFETY_CHECKER") === "true",
safety_tolerance: Number(runtime.getSetting("FAL_AI_SAFETY_TOLERANCE") || "2"),
enable_safety_checker:
runtime.getSetting("FAL_AI_ENABLE_SAFETY_CHECKER") ===
"true",
safety_tolerance: Number(
runtime.getSetting("FAL_AI_SAFETY_TOLERANCE") || "2"
),

Check warning on line 1074 in packages/core/src/generation.ts

View check run for this annotation

Codecov / codecov/patch

packages/core/src/generation.ts#L1069-L1074

Added lines #L1069 - L1074 were not covered by tests
output_format: "png" as const,
seed: data.seed ?? 6252023,
...(runtime.getSetting("FAL_AI_LORA_PATH")
Expand Down Expand Up @@ -1368,6 +1372,7 @@ export async function handleProvider(
case ModelProviderName.AKASH_CHAT_API:

Check warning on line 1372 in packages/core/src/generation.ts

View check run for this annotation

Codecov / codecov/patch

packages/core/src/generation.ts#L1372

Added line #L1372 was not covered by tests
return await handleOpenAI(options);
case ModelProviderName.ANTHROPIC:
case ModelProviderName.CLAUDE_VERTEX:

Check warning on line 1375 in packages/core/src/generation.ts

View check run for this annotation

Codecov / codecov/patch

packages/core/src/generation.ts#L1375

Added line #L1375 was not covered by tests
return await handleAnthropic(options);
case ModelProviderName.GROK:
return await handleGrok(options);
Expand Down

0 comments on commit dfab4c1

Please sign in to comment.