Skip to content

Commit

Permalink
Fix double Anthropic requests (#543)
Browse files Browse the repository at this point in the history
#541 accidentally caused anthropic requests to be sent twice.
  • Loading branch information
petersalas committed Apr 10, 2024
1 parent 7d7ca59 commit 2907154
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ai-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": "fixie-ai/ai-jsx",
"bugs": "https://github.com/fixie-ai/ai-jsx/issues",
"homepage": "https://ai-jsx.com",
"version": "0.30.1",
"version": "0.30.2",
"volta": {
"extends": "../../package.json"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-jsx/src/lib/anthropic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export async function* AnthropicChatModel(
const responsePromise = anthropic.messages.create(anthropicCompletionRequest);
let response: Awaited<typeof responsePromise>;
try {
response = await anthropic.messages.create(anthropicCompletionRequest);
response = await responsePromise;
} catch (err) {
if (err instanceof AnthropicSDK.APIError) {
throw new AIJSXError(
Expand Down
6 changes: 5 additions & 1 deletion packages/docs/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## 0.30.1
## 0.30.2

- Fix double Anthropic requests

## [0.30.1](https://github.com/fixie-ai/ai-jsx/tree/7d7ca5987b638969478940a779dededdbe1abbfb)

- Add new OpenAI models

Expand Down

0 comments on commit 2907154

Please sign in to comment.