Codium-ai / pr-agent

🚀CodiumAI PR-Agent: An AI-Powered 🤖 Tool for Automated Pull Request Analysis, Feedback, Suggestions and More! 💻🔍
Apache License 2.0
5.98k stars 577 forks source link

There is support for gpt4 o mini? #1055

Closed PauloHFS closed 3 months ago

PauloHFS commented 3 months ago

Is possible to use gpt4 o mini as model on pr agent? if yes, how can I do it?

PauloHFS commented 3 months ago

Well, I have some time in at work and change some configs via env vars on our pr-agent container. I set:

CONFIG.MODEL=gpt-4o-mini-2024-07-18
CONFIG.MODEL_TURBO=gpt-4o-mini
CONFIG.FALLBACK_MODELS=[\"gpt-4o-mini\"]

In my tests I get:

{
  "text": "Relevant configs\n",
  "record": {
    "elapsed": {
      "repr": "0:01:00.462433",
      "seconds": 60.462433
    },
    "exception": null,
    "extra": {
      "action": "created",
      "event": "issue_comment",
      "sender": "PauloHFS",
      "server_type": "github_app",
      "request_id": "5348c4fbe71240e0baa450349426890f",
      "build_number": "343",
      "app_name": "Unknown",
      "repo": "Forte-Tecnologias/gn-florestal",
      "git_org": "Forte-Tecnologias",
      "installation_id": 52303911,
      "api_url": "https://api.github.com/repos/Forte-Tecnologias/gn-florestal/pulls/126",
      "command": "help",
      "artifacts": {
        "pr_help": {},
        "config": {
          "fallback_models": "[\\\\\\\"gpt-4o-mini\\\\\\\"]",
          "verbosity_level": 2,
          "model_turbo": "gpt-4o-mini",
          "model": "gpt-4o-mini-2024-07-18",
          "enable_custom_labels": false,
          "git_provider": "github",
          "publish_output": true,
          "publish_output_progress": true,
          "use_extra_bad_extensions": false,
          "use_wiki_settings_file": true,
          "use_repo_settings_file": true,
          "use_global_settings_file": true,
          "ai_timeout": 120,
          "max_description_tokens": 500,
          "max_commits_tokens": 500,
          "max_model_tokens": 32000,
          "patch_extra_lines": 1,
          "secret_provider": "",
          "cli_mode": false,
          "ai_disclaimer_title": "",
          "ai_disclaimer": "",
          "output_relevant_configurations": false,
          "large_patch_policy": "clip",
          "is_auto_command": false
        }
      }
    },
    "file": {
      "name": "pr_help_message.py",
      "path": "/app/pr_agent/tools/pr_help_message.py"
    },
    "function": "run",
    "level": {
      "icon": "🐞",
      "name": "DEBUG",
      "no": 10
    },
    "line": 20,
    "message": "Relevant configs",
    "module": "pr_help_message",
    "name": "pr_agent.tools.pr_help_message",
    "process": {
      "id": 17,
      "name": "MainProcess"
    },
    "thread": {
      "id": 140483957652352,
      "name": "MainThread"
    },
    "time": {
      "repr": "2024-07-24 20:56:18.279746+00:00",
      "timestamp": 1721854578.279746
    }
  }
}

I don't have access to the openai dashboard only the key of my company, so I don't now if its correct. Should I assume that I am using only the gpt-4-o-mini.

mrT23 commented 3 months ago

gpt4o-mini is supported:

https://github.com/Codium-ai/pr-agent/pull/1051

image