Commit
·
bdc1e93
1
Parent(s):
673a80a
fix: try gemini
Browse files- app.py +2 -1
- requirements.txt +3 -1
app.py
CHANGED
@@ -7,6 +7,7 @@ from llama_index.readers.youtube_transcript import YoutubeTranscriptReader
|
|
7 |
from llama_index.core.tools import FunctionTool
|
8 |
from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
|
9 |
from llama_index.core.agent.workflow import AgentWorkflow
|
|
|
10 |
import pandas as pd
|
11 |
import asyncio
|
12 |
|
@@ -18,7 +19,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
18 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
19 |
class BasicAgent:
|
20 |
def __init__(self):
|
21 |
-
self.llm =
|
22 |
print("BasicAgent initialized.")
|
23 |
def __call__(self, question: str) -> str:
|
24 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
|
|
7 |
from llama_index.core.tools import FunctionTool
|
8 |
from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
|
9 |
from llama_index.core.agent.workflow import AgentWorkflow
|
10 |
+
from llama_index.llms.gemini import Gemini
|
11 |
import pandas as pd
|
12 |
import asyncio
|
13 |
|
|
|
19 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
20 |
class BasicAgent:
|
21 |
def __init__(self):
|
22 |
+
self.llm = Gemini(model_name="models/gemini-2.0-flash-thinking-exp-01-21")
|
23 |
print("BasicAgent initialized.")
|
24 |
def __call__(self, question: str) -> str:
|
25 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
requirements.txt
CHANGED
@@ -5,4 +5,6 @@ llama_index-llms-ollama
|
|
5 |
llama_index-tools-duckduckgo
|
6 |
llama_index-readers-youtube_transcript
|
7 |
llama_index-retrievers-bm25
|
8 |
-
llama_index-llms-huggingface_api
|
|
|
|
|
|
5 |
llama_index-tools-duckduckgo
|
6 |
llama_index-readers-youtube_transcript
|
7 |
llama_index-retrievers-bm25
|
8 |
+
llama_index-llms-huggingface_api
|
9 |
+
llama-index-tools-google
|
10 |
+
llama-index-llms-gemini
|