mralamdari commited on
Commit
7cd0af8
·
verified ·
1 Parent(s): 482279f

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +21 -0
agent.py CHANGED
@@ -17,6 +17,27 @@ FINAL ANSWER: [YOUR FINAL ANSWER].
17
  YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, Apply the rules above for each element (number or string), ensure there is exactly one space after each comma.
18
  Your answer should only start with "FINAL ANSWER: ", then follows with the answer. """
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  GPT_4o_API_KEY = os.environ["META_LLAMA_4_MAVERICK"]
21
  # GPT_4o_API_KEY = os.environ["GPT_4o_API_KEY"]
22
  TAVILY_API_KEY = os.environ["TAVILY_API_KEY"]
 
17
  YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, Apply the rules above for each element (number or string), ensure there is exactly one space after each comma.
18
  Your answer should only start with "FINAL ANSWER: ", then follows with the answer. """
19
 
20
+ import os
21
+ import json
22
+ import torch
23
+ import base64
24
+ import requests
25
+ import mimetypes
26
+ from PIL import Image
27
+ from langchain_core.tools import tool
28
+ from tavily import TavilyClient
29
+ from dataclasses import dataclass, field
30
+ from langchain_openai import ChatOpenAI
31
+ from langgraph.graph import StateGraph, START, END, MessagesState
32
+ from langchain_experimental.utilities import PythonREPL
33
+ from langchain_core.messages import SystemMessage, HumanMessage
34
+ from typing import TypedDict, List, Dict, Any, Optional, Annotated
35
+ from transformers import Blip2Processor, Blip2ForConditionalGeneration
36
+ from langchain_community.document_loaders import WikipediaLoader
37
+ from langchain_community.document_loaders import ArxivLoader
38
+ from langgraph.prebuilt import ToolNode, tools_condition
39
+ from langchain_core.messages import SystemMessage, HumanMessage
40
+
41
  GPT_4o_API_KEY = os.environ["META_LLAMA_4_MAVERICK"]
42
  # GPT_4o_API_KEY = os.environ["GPT_4o_API_KEY"]
43
  TAVILY_API_KEY = os.environ["TAVILY_API_KEY"]