Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

Auto-update documentation after merge [skip ci]

camel-docs-botca838058343e
diff --git a/docs/mintlify/cookbooks/data_processing/video_analysis.mdx b/docs/mintlify/cookbooks/data_processing/video_analysis.mdx
index f57c3e4a6..b9b1e13aa 100644
--- a/docs/mintlify/cookbooks/data_processing/video_analysis.mdx
+++ b/docs/mintlify/cookbooks/data_processing/video_analysis.mdx
@@ -2,7 +2,7 @@
title: "Video Analysis"
---
-You can also check this cookbook in colab [here](https://colab.research.google.com/drive/1XfF4BOSzo_rj9J58aZYanMUk5vixn-eR?usp=sharing)
+You can also check this cookbook in colab [here](https://colab.research.google.com/drive/1egJ-14pRtBbM9lkqhHcZp75mAki1lgzS?usp=sharing)
<div style={{ display: "flex", justifyContent: "center", alignItems: "center", gap: "1rem", marginBottom: "2rem" }}>
<a href="https://www.camel-ai.org/">
@@ -28,7 +28,7 @@ In this notebook, you'll explore:
```python
-%pip install "camel-ai[all]==0.2.16"
+%pip install "camel-ai[all]==0.2.66"
```
## 🔑 Setting Up API Keys
@@ -60,6 +60,16 @@ To do so, **comment out** the above **manual** API key prompt code block(s), and
## Set up an agent for video analysis task
+```python
+from camel.toolkits import VideoDownloaderToolkit
+#Download video to be analyse
+urls=["https://www.youtube.com/watch?v=n3u5EcjRmdY","https://youtu.be/PNqrHNQlU6I?si=8s2Zvh_F1-bIkeBr"]
+video_downloader = VideoDownloaderToolkit("./download")
+for url in urls:
+ video_downloader.download_video(url)
+```
+
+
```python
from camel.agents import ChatAgent
from camel.configs.openai_config import ChatGPTConfig
@@ -97,7 +107,7 @@ camel_agent = ChatAgent(
```python
# Provide your video path
-video_cctv = "/content/CCTV.mov"
+video_cctv = "/content/download/This AI Agent Analyses Videos Brilliantly (5 Easy Examples You Can Try).mp4"
with open(video_cctv, "rb") as video_cctv:
video_bytes_cctv = video_cctv.read()
@@ -117,7 +127,7 @@ print(response_cctv.msgs[0].content)
```python
# Provide your video path
-video_help = "/content/help.mov"
+video_help = "/content/download/Introducing CRAB.mp4"
with open(video_help, "rb") as video_help:
video_bytes_help = video_help.read()
@@ -134,29 +144,9 @@ response_help = camel_agent.step(user_msg_help)
print(response_help.msgs[0].content)
```
-
-```python
-# Provide your video path
-video_content_mode = "/content/content mod.mov"
-with open(video_content_mode, "rb") as video_content_mode:
- video_bytes_content_mode = video_content_mode.read()
-
-# Set user message
-user_msg_content_mode = BaseMessage.make_user_message(
- role_name="User",
- content="These are frames from a video that I want to upload. Generate a"
- "compelling description that I can upload along with the video.",
- video_bytes=video_bytes_content_mode,
-)
-
-# Get response information
-response_content_mode = camel_agent.step(user_msg_content_mode)
-print(response_content_mode.msgs[0].content)
-```
-
## 🌟 Highlights
-This notebook has guided you through setting up an agent and analyzing videos using CAMEL.
+This notebook has guided you through setting up an agent and analyzing videos using CAMEL.
Now, you know how to generate description for uploaded videos.