Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/key_moments.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,21 @@ def extract_key_moments(self) -> List[Dict]:
try:
if self.api_provider == "anthropic":
try:
response = self.anthropic.messages.create(
# Use streaming for long operations (required for >10 min operations)
response_text = ""
with self.anthropic.messages.stream(
model="claude-opus-4-1-20250805", # Latest and most capable Claude model
max_tokens=16384,
system="You are a meeting analyzer that breaks down discussions into topics, key moments, and takeaways. You only respond with properly formatted JSON.",
messages=[{
"role": "user",
"content": prompt
}]
)
response_text = response.content[0].text
) as stream:
for text in stream.text_stream:
response_text += text
print(".", end="", flush=True) # Show progress
print() # New line after streaming
except anthropic.RateLimitError as e:
raise Exception(f"Anthropic API rate limit exceeded. Please check your usage and billing: {str(e)}")
except anthropic.AuthenticationError as e:
Expand Down