Commit ·
fba8c96
1
Parent(s): aa94df3
Update agent prompt
Browse files8 unmodified lines910111212131415161712 unmodified lines30313233343536373839404112 unmodified lines545556505758596061628 unmodified lines excel_reader, math_calculator, search_engine, image_transcriber, image_analyzer, YoutubeTranscriberTool, YoutubeVideoDescriptorTool,)from utils import OPENAI_MODEL_ID
12 unmodified linesKey points:- Do not add any prefix or suffix to YOUR FINAL ANSWER.- Answer shortly and concisely, following the template strictly.- Again, YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
Example:[Final Answer: 42]Good example: "42"Bad example: "The answer is 42""""
12 unmodified lines txt_reader, pdf_reader, excel_reader, image_transcriber, image_analyzer, YoutubeTranscriberTool(), YoutubeVideoDescriptorTool(), ], max_steps=5, model=model,307 unmodified lines3083093103113113133123133143154 unmodified lines320321322324323324325326327328329330331332307 unmodified lines if not ret: break
# Keep every Nth frame to reduce to target_fps if i % frame_interval == 0: frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)) # store frame in memory (RGB) frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
i += 1
4 unmodified lines _, buffer = cv2.imencode(".jpg", frame) encoded_buffer = base64.b64encode(buffer).decode("utf-8") base64_frames.append(encoded_buffer) if len(base64_frames) == 20: # yield every 20 frames if len(base64_frames) == 20: # yield every 20 frames yield base64_frames base64_frames = [] # yield any remaining frames if len(frames) < 20: yield base64_frames
def forward(self, task: str, youtube_url: str) -> str: # pylint: disable=W0221 file_name = f"{uuid4()}.mp4"agent.py+10-2
tools.py+6-3