Skip to content

Commit 2ea54ea

Browse files
committed
fix: gemini errror
1 parent 35ae76f commit 2ea54ea

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

examples/gemini/csv_scraper_gemini.py

+3-10
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,13 @@
1919
# ************************************************
2020
# Define the configuration for the graph
2121
# ************************************************
22+
gemini_key = os.getenv("GOOGLE_APIKEY")
2223

2324
graph_config = {
2425
"llm": {
25-
"model": "ollama/mistral",
26-
"temperature": 0,
27-
"format": "json", # Ollama needs the format to be specified explicitly
28-
# "model_tokens": 2000, # set context length arbitrarily
29-
"base_url": "http://localhost:11434",
26+
"api_key": gemini_key,
27+
"model": "gemini-pro",
3028
},
31-
"embeddings": {
32-
"model": "ollama/nomic-embed-text",
33-
"temperature": 0,
34-
"base_url": "http://localhost:11434",
35-
}
3629
}
3730

3831
# ************************************************

examples/gemini/smart_scraper_gemini.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
graph_config = {
1919
"llm": {
2020
"api_key": gemini_key,
21-
"model": "gpt-3.5-turbo",
21+
"model": "gemini-pro",
2222
},
2323
}
2424

scrapegraphai/helpers/models_tokens.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"gpt-4-32k-0613": 32768,
2121
},
2222
"azure": {
23-
"gpt-3.5-turbo": 4096
23+
"gpt-3.5-turbo": 4096,
24+
"gpt-4": 8192,
25+
"gpt-4-32k": 32768
2426
},
2527
"gemini": {
2628
"gemini-pro": 128000,
@@ -48,4 +50,3 @@
4850
"claude3": 200000
4951
}
5052
}
51-

0 commit comments

Comments
 (0)