Skip to content

Commit

Permalink
fix: gemini errror
Browse files Browse the repository at this point in the history
  • Loading branch information
VinciGit00 committed May 2, 2024
1 parent 35ae76f commit 2ea54ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
13 changes: 3 additions & 10 deletions examples/gemini/csv_scraper_gemini.py
Expand Up @@ -19,20 +19,13 @@
# ************************************************
# Define the configuration for the graph
# ************************************************
gemini_key = os.getenv("GOOGLE_APIKEY")

graph_config = {
"llm": {
"model": "ollama/mistral",
"temperature": 0,
"format": "json", # Ollama needs the format to be specified explicitly
# "model_tokens": 2000, # set context length arbitrarily
"base_url": "http://localhost:11434",
"api_key": gemini_key,
"model": "gemini-pro",
},
"embeddings": {
"model": "ollama/nomic-embed-text",
"temperature": 0,
"base_url": "http://localhost:11434",
}
}

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/gemini/smart_scraper_gemini.py
Expand Up @@ -18,7 +18,7 @@
graph_config = {
"llm": {
"api_key": gemini_key,
"model": "gpt-3.5-turbo",
"model": "gemini-pro",
},
}

Expand Down
5 changes: 3 additions & 2 deletions scrapegraphai/helpers/models_tokens.py
Expand Up @@ -20,7 +20,9 @@
"gpt-4-32k-0613": 32768,
},
"azure": {
"gpt-3.5-turbo": 4096
"gpt-3.5-turbo": 4096,
"gpt-4": 8192,
"gpt-4-32k": 32768
},
"gemini": {
"gemini-pro": 128000,
Expand Down Expand Up @@ -48,4 +50,3 @@
"claude3": 200000
}
}

0 comments on commit 2ea54ea

Please sign in to comment.