Skip to content

Config file not being used [Mac] #4

@dantheman0207

Description

@dantheman0207

The issue: git-iris doesn't automatically create a config file, and when I manually create it git-iris doesn't respect the settings in that file.

I'm on a Mac mini using apple silicon, running OS X 15.1.1 (24B91). 🔮 Git-Iris version 0.8.0, cargo 1.83.0.
After installing git-iris via cargo I am able to use it, but the config file was not created at ~/.config/git-iris/config.toml. I manually created the file with the below settings:

default_provider = "ollama"
use_gitmoji = true
instructions = "None"
instruction_preset = "default"

[providers]

[providers.claude]
api_key = ""
model = "claude-3-5-sonnet-20240620"
token_limit = 150000
additional_parameters = {}

[providers.openai]
api_key = ""
model = "gpt-4o"
token_limit = 100000
additional_parameters = {}

[providers.ollama]
api_key = ""
model = "mistral:latest"
token_limit = 100000
additional_parameters = {}

[providers.test]
api_key = ""
model = "test-model"
token_limit = 1000
additional_parameters = {}

However these settings are not respected when running git-iris inside a git repo. I get this output:

$ git-iris gen
🔮 Git-Iris version 0.8.0

Error: Failed to generate message: OpenAI API request failed with status 401 Unauthorized: {
    "error": {
        "message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.",
        "type": "invalid_request_error",
        "param": null,
        "code": null
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions