|
26 | 26 | "- TwelveLabs API key from [TwelveLabs Platform](https://playground.twelvelabs.io/)\n", |
27 | 27 | "- Python 3.9+ environment\n", |
28 | 28 | "\n", |
29 | | - "**For AWS Bedrock:**\n", |
| 29 | + "**For Amazon Bedrock:**\n", |
30 | 30 | "- AWS account with [Amazon Bedrock model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html)\n", |
31 | | - "- AWS CLI configured with appropriate permissions\n", |
32 | | - "- S3 bucket for video storage" |
| 31 | + "- [AWS CLI](https://aws.amazon.com/cli/) configured with appropriate permissions\n", |
| 32 | + "- [Amazon S3 bucket](https://aws.amazon.com/s3/) for video storage" |
33 | 33 | ] |
34 | 34 | }, |
35 | 35 | { |
|
146 | 146 | "\n", |
147 | 147 | "anthropic_model = AnthropicModel(\n", |
148 | 148 | " client_args={\"api_key\": ANTHROPIC_API_KEY},\n", |
149 | | - " model_id=\"claude-3-7-sonnet-20250219\",\n", |
| 149 | + " model_id=\"claude-3-7-sonnet-20250219\", #or us.claude-3-7-sonnet-20250219 ,see https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html \n", |
150 | 150 | " max_tokens=1024,\n", |
151 | 151 | " params={\"temperature\": 0.3}\n", |
152 | 152 | ")\n", |
|
195 | 195 | "outputs": [], |
196 | 196 | "source": [ |
197 | 197 | "# Summarize an existing video (replace with actual video ID from the list above)\n", |
198 | | - "response = twelvelabs_agent(\"Summarize the first video in the list\")\n", |
| 198 | + "response = twelvelabs_agent(\"When is S3 mentioned in the video?\")\n", |
199 | 199 | "print(response)" |
200 | 200 | ] |
201 | 201 | }, |
|
298 | 298 | "print(response)" |
299 | 299 | ] |
300 | 300 | }, |
| 301 | + { |
| 302 | + "cell_type": "code", |
| 303 | + "execution_count": null, |
| 304 | + "id": "1df6abf7", |
| 305 | + "metadata": {}, |
| 306 | + "outputs": [], |
| 307 | + "source": [ |
| 308 | + "response = bedrock_agent(f\"Analyze the video2 and tell me what it's about\")" |
| 309 | + ] |
| 310 | + }, |
| 311 | + { |
| 312 | + "cell_type": "code", |
| 313 | + "execution_count": null, |
| 314 | + "id": "222e52d8", |
| 315 | + "metadata": {}, |
| 316 | + "outputs": [], |
| 317 | + "source": [ |
| 318 | + "response = bedrock_agent(\"When is S3 mentioned in the video?\")" |
| 319 | + ] |
| 320 | + }, |
301 | 321 | { |
302 | 322 | "cell_type": "markdown", |
303 | 323 | "id": "example_analyze_bedrock", |
|
330 | 350 | "source": [ |
331 | 351 | "## Comparison: TwelveLabs vs AWS Bedrock\n", |
332 | 352 | "\n", |
333 | | - "| Feature | TwelveLabs | AWS Bedrock |\n", |
| 353 | + "| Feature | TwelveLabs | Amazon Bedrock |\n", |
334 | 354 | "|---------|------------|-------------|\n", |
335 | 355 | "| **Setup** | API key required | AWS credentials required |\n", |
336 | 356 | "| **Video Processing** | Index-based, persistent | Direct analysis |\n", |
|
349 | 369 | "\n", |
350 | 370 | "For more help, refer to:\n", |
351 | 371 | "- [TwelveLabs Documentation](https://docs.twelvelabs.io/)\n", |
352 | | - "- [AWS Bedrock Documentation](https://docs.aws.amazon.com/bedrock/)\n", |
| 372 | + "- [Amazon Bedrock Documentation](https://docs.aws.amazon.com/bedrock/)\n", |
353 | 373 | "- [Strands Agents Documentation](https://strandsagents.com/)" |
354 | 374 | ] |
355 | 375 | }, |
|
0 commit comments