josondev commited on
Commit
f95d653
·
verified ·
1 Parent(s): 770d3fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -4,7 +4,7 @@ import requests
4
  import pandas as pd
5
  from dotenv import load_dotenv
6
  from langchain_openai import ChatOpenAI
7
- #from langchain_nvidia_ai_endpoints import ChatNVIDIA
8
 
9
  # Load environment variables
10
  load_dotenv()
@@ -14,8 +14,8 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
14
 
15
  # --- Basic Agent Definition ---
16
  class BasicAgent:
17
- def __init__(self):
18
- self.llm = ChatOpenAI(model="gpt-4o-mini",streaming=False,base_url="https://aiproxy.sanand.workers.dev/openai/v1",api_key=os.getenv("AIPROXY_TOKEN"))
19
  self.instructions = """You are a helpful assistant. For every question, reply with only the answer—no explanation, "
20
  "no units, and no extra words. If the answer is a number, just return the number. "
21
  "If it is a word or phrase, return only that. If it is a list, return a comma-separated list with no extra words. "
 
4
  import pandas as pd
5
  from dotenv import load_dotenv
6
  from langchain_openai import ChatOpenAI
7
+ from langchain_nvidia_ai_endpoints import ChatNVIDIA
8
 
9
  # Load environment variables
10
  load_dotenv()
 
14
 
15
  # --- Basic Agent Definition ---
16
  class BasicAgent:
17
+ def __init__(self):
18
+ llm=ChatNVIDIA(model="meta/llama-3.3-70b-instruct",nvidia_api_key=os.getenv("NVIDIA_API_KEY"))
19
  self.instructions = """You are a helpful assistant. For every question, reply with only the answer—no explanation, "
20
  "no units, and no extra words. If the answer is a number, just return the number. "
21
  "If it is a word or phrase, return only that. If it is a list, return a comma-separated list with no extra words. "