sarath2803 commited on
Commit
02de1f1
·
verified ·
1 Parent(s): cf7dd7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -4,7 +4,8 @@ import requests
4
  import inspect
5
  import pandas as pd
6
  #model requirement
7
- from smolagents import DuckDuckGoSearchTool, load_tool, tool, CodeAgent ,InferenceClientModel
 
8
  from typing import TypedDict, List, Dict, Any, Optional
9
  from langgraph.graph import StateGraph, END
10
  from langchain_openai import ChatOpenAI
@@ -86,7 +87,7 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
86
  class BasicAgent:
87
  def __init__(self):
88
  print("BasicAgent initialized.")
89
- os.environ["OPENAI_API_KEY"] = "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"
90
  self.system_prompt= """You are a helpful assistant. You will answer questions based on the provided context.You will always return a valid answer, even if the question is not clear or the context is insufficient. If you cannot answer, return a default answer.Always return a valid answer after validating the source.
91
  Always return the answer in the following format:
92
  "ANSWER: <your answer here>".
 
4
  import inspect
5
  import pandas as pd
6
  #model requirement
7
+ from smolagents import DuckDuckGoSearchTool, load_tool, tool, CodeAgent
8
+ from smol_agents.llms import InferenceClientModel
9
  from typing import TypedDict, List, Dict, Any, Optional
10
  from langgraph.graph import StateGraph, END
11
  from langchain_openai import ChatOpenAI
 
87
  class BasicAgent:
88
  def __init__(self):
89
  print("BasicAgent initialized.")
90
+ os.environ["OPENAI_API_KEY"] = "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"
91
  self.system_prompt= """You are a helpful assistant. You will answer questions based on the provided context.You will always return a valid answer, even if the question is not clear or the context is insufficient. If you cannot answer, return a default answer.Always return a valid answer after validating the source.
92
  Always return the answer in the following format:
93
  "ANSWER: <your answer here>".