Skip to content

Handle older versions of anthropic - #316

Merged
alexmojaki merged 4 commits into
mainfrom
alex/old-anthropic
Jul 17, 2024
Merged

alexmojaki merged 4 commits into
mainfrom
alex/old-anthropic

Conversation

@alexmojaki

Copy link
Copy Markdown
Contributor

Closes #313

Ideally we'd also test on the older version in CI, but that seems like less of a priority.

'logfire.tags': ('LLM',),
'duration': 1.0,
'response_data': '{"combined_chunk_content":"The answer is secret","chunk_count":3}',
'response_data': '{"combined_chunk_content":"The answer is secret","chunk_count":2}',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more liberal checking in content_from_messages started counting an additional chunk with empty text. So I started excluding all chunks with empty text, and it turns out there was already one being counted.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 15, 2024

Copy link
Copy Markdown

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: df20461
Status: ✅  Deploy successful!
Preview URL: https://a71733ca.logfire-docs.pages.dev
Branch Preview URL: https://alex-old-anthropic.logfire-docs.pages.dev

View logs

@codecov

codecov Bot commented Jul 15, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@alexmojaki
alexmojaki requested a review from Kludex July 15, 2024 18:08
@alexmojaki

Copy link
Copy Markdown
Contributor Author

cc @willbakst

@willbakst willbakst left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexmojaki
alexmojaki enabled auto-merge (squash) July 17, 2024 15:09
@alexmojaki
alexmojaki merged commit 474f525 into main Jul 17, 2024
@alexmojaki
alexmojaki deleted the alex/old-anthropic branch July 17, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Anthropic Instrumentation errors

3 participants