from llama_index.core.llms import Gemini
from dotenv import load_dotenv
import os
import pandas as pd
from llama_index.core.query_engine import PandasQueryEngine
from prompts import new_prompt, instruction_str
from llama_index.llms.gemini import Gemini
GOOGLE_API_KEY = "my-api-is-here";
os.environ["GOOGLE_API_KEY"] = GOOGLE_API_KEY
data_path = os.path.join('data', 'data-info.csv');
data_df = pd.read_csv(data_path);
data_query_engin = PandasQueryEngine(df=data_df, verbose=True, instruction_str=instruction_str);
data_query_engin.update_prompts({'pandas_prompt': new_prompt});
data_query_engin.query("what is the second surah and what is about?")
from llama_index.core.llms import Gemini
from dotenv import load_dotenv
import os
import pandas as pd
from llama_index.core.query_engine import PandasQueryEngine
from prompts import new_prompt, instruction_str
from llama_index.llms.gemini import Gemini
GOOGLE_API_KEY = "api-here";
os.environ["GOOGLE_API_KEY"] = GOOGLE_API_KEY
llm = Gemini()
data_path = os.path.join('data', 'data-info.csv');
data_df = pd.read_csv(data_path);
data_query_engin = PandasQueryEngine(df=data_df, verbose=True, instruction_str=instruction_str,llm=llm);
data_query_engin.update_prompts({'pandas_prompt': new_prompt});
data_query_engin.query("what is the second surah and what is about?")
ImportError: cannot import name 'Gemini' from 'llama_index.core.llms' (/Users/ahmednadiir/Desktop/agency/localEvir/lib/python3.11/site-packages/llama_index/core/llms/__init__.py)
from llama_index.core.llms import Gemini
from dotenv import load_dotenv
import os
import pandas as pd
from llama_index.core.query_engine import PandasQueryEngine
from prompts import new_prompt, instruction_str
from llama_index.llms.gemini import Gemini
GOOGLE_API_KEY = "api-is-here";
os.environ["GOOGLE_API_KEY"] = GOOGLE_API_KEY
llm = Gemini()
data_path = os.path.join('data', 'data-info.csv');
data_df = pd.read_csv(data_path);
data_query_engin = PandasQueryEngine(df=data_df, verbose=True, instruction_str=instruction_str,llm=llm);
data_query_engin.update_prompts({'pandas_prompt': new_prompt});
data_query_engin.query("what is the second surah and what is about?")
install llama-index-llms-gemini
and also like this pip install -q llama-index google-generativeai
but somehow still getting this error: ImportError: cannot import name 'Gemini' from 'llama_index.core.llms' (/Users/ahmednadiir/Desktop/agency/localEvir/lib/python3.11/site-packages/llama_index/core/llms/__init__.py)
from dotenv import load_dotenv import os import pandas as pd from llama_index.core.query_engine import PandasQueryEngine from prompts import new_prompt, instruction_str from llama_index.llms.gemini import Gemini GOOGLE_API_KEY = "api-is-here"; os.environ["GOOGLE_API_KEY"] = GOOGLE_API_KEY llm = Gemini() data_path = os.path.join('data', 'data-info.csv'); data_df = pd.read_csv(data_path); data_query_engin = PandasQueryEngine(df=data_df, verbose=True, instruction_str=instruction_str,llm=llm); data_query_engin.update_prompts({'pandas_prompt': new_prompt}); data_query_engin.query("what is the second surah and what is about?")