diff --git a/src/Providers/Anthropic/Enums/AnthropicCacheType.php b/src/Providers/Anthropic/Enums/AnthropicCacheType.php index e21331a..e3581e9 100644 --- a/src/Providers/Anthropic/Enums/AnthropicCacheType.php +++ b/src/Providers/Anthropic/Enums/AnthropicCacheType.php @@ -4,5 +4,5 @@ enum AnthropicCacheType { - case ethemeral; + case ephemeral; } diff --git a/tests/Providers/Anthropic/AnthropicTextTest.php b/tests/Providers/Anthropic/AnthropicTextTest.php index 008dfbc..d8eb1f8 100644 --- a/tests/Providers/Anthropic/AnthropicTextTest.php +++ b/tests/Providers/Anthropic/AnthropicTextTest.php @@ -172,10 +172,10 @@ ->using('anthropic', 'claude-3-5-sonnet-20240620') ->withMessages([ (new SystemMessage('Old context'))->withProviderMeta(Provider::Anthropic, ['cacheType' => 'ephemeral']), - (new UserMessage('New context'))->withProviderMeta(Provider::Anthropic, ['cacheType' => 'ephemeral']) + (new UserMessage('New context'))->withProviderMeta(Provider::Anthropic, ['cacheType' => 'ephemeral']), ]) ->generate(); expect($response->usage->cacheWriteInputTokens)->toBe(200); expect($response->usage->cacheReadInputTokens)->ToBe(100); -}); \ No newline at end of file +}); diff --git a/tests/Providers/Anthropic/MessageMapTest.php b/tests/Providers/Anthropic/MessageMapTest.php index 7b17821..0da1f16 100644 --- a/tests/Providers/Anthropic/MessageMapTest.php +++ b/tests/Providers/Anthropic/MessageMapTest.php @@ -160,13 +160,13 @@ [ 'type' => 'text', 'text' => 'Who are you?', - 'cache_control' => ['type' => 'ethemeral'], + 'cache_control' => ['type' => 'ephemeral'], ], ], ]]); })->with([ - 'ethemeral', - AnthropicCacheType::ethemeral, + 'ephemeral', + AnthropicCacheType::ephemeral, ]); it('sets the cache type on an AssistantMessage if cacheType providerMeta is set on message using an enum', function (mixed $cacheType): void { @@ -178,13 +178,13 @@ [ 'type' => 'text', 'text' => 'Who are you?', - 'cache_control' => ['type' => AnthropicCacheType::ethemeral->name], + 'cache_control' => ['type' => AnthropicCacheType::ephemeral->name], ], ], ]]); })->with([ - 'ethemeral', - AnthropicCacheType::ethemeral, + 'ephemeral', + AnthropicCacheType::ephemeral, ]); it('sets the cache type on a SystemMessage if cacheType providerMeta is set on message using an enum', function (): void {})->todo('This test will need adding when the multiple system prompts PR gets merged.'); diff --git a/tests/Providers/Anthropic/ToolMapTest.php b/tests/Providers/Anthropic/ToolMapTest.php index 70fe9a1..0de144d 100644 --- a/tests/Providers/Anthropic/ToolMapTest.php +++ b/tests/Providers/Anthropic/ToolMapTest.php @@ -53,9 +53,9 @@ ], 'required' => ['query'], ], - 'cache_control' => ['type' => 'ethemeral'], + 'cache_control' => ['type' => 'ephemeral'], ]]); })->with([ - 'ethemeral', - AnthropicCacheType::ethemeral, + 'ephemeral', + AnthropicCacheType::ephemeral, ]);