Skip to content

add: Google-genai for Gemini models#58

Merged
EYH0602 merged 7 commits into
mainfrom
refactor-experiment
Apr 30, 2025
Merged

add: Google-genai for Gemini models#58
EYH0602 merged 7 commits into
mainfrom
refactor-experiment

Conversation

@EYH0602
Copy link
Copy Markdown
Member

@EYH0602 EYH0602 commented Apr 30, 2025

No description provided.

@EYH0602 EYH0602 requested a review from Copilot April 30, 2025 18:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Google-genai for Gemini models by updating model configurations and refactoring related functions across multiple modules. Key changes include renaming and parameter adjustments in the Ollama and Gemini model functions, updating dependency versions in the project configuration, and modifying the main experiment logic to integrate new model interfaces.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/experiment_ollama.py Removed seed/temperature parameters and renamed get_model to get_ollama_model.
src/experiment.py Updated model lists and function calls to incorporate new Gemini model variants.
src/common.py Adjusted get_prompt function by removing the full_type flag and related logic.
main.py Updated model assertions and client initializations to support Google-genai.
pyproject.toml Bumped dependency versions for google-genai, openai, and ollama.
scripts/result_token_stat.py Added script for token count statistics.
README.md Updated script commands for consistency.
src/init.py Configured logging levels for openai and httpx modules.
Files not reviewed (1)
  • .envrc: Language not supported
Comments suppressed due to low confidence (1)

main.py:91

  • There is an inconsistency between the environment variable checked ('OPENAI_API_KEY') and the error message stating 'OPEN_API_KEY'. Consider aligning the error message with the actual variable name.
assert "OPENAI_API_KEY" in os.environ, "Please set OPEN_API_KEY in environment!"

Comment thread src/experiment_ollama.py


def get_model(
def get_ollama_model(
Copy link

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function's docstring still mentions 'seed' and 'temperature' parameters which have been removed from the signature. Please update the documentation to reflect the current function parameters.

Copilot uses AI. Check for mistakes.
@EYH0602 EYH0602 merged commit 7d230eb into main Apr 30, 2025
3 checks passed
@EYH0602 EYH0602 deleted the refactor-experiment branch April 30, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants