8000 Feat/connection request by jsburckhardt · Pull Request #17 · jsburckhardt/gic · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feat/connection request #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 20, 2024
Merged

Feat/connection request #17

merged 8 commits into from
Nov 20, 2024

Conversation

jsburckhardt
Copy link
Owner

This pull request includes significant updates to the configuration and environment variable handling for the project, as well as improvements to the command-line interface and dependencies. The most important changes include adding support for generating a sample .env file, updating the README with detailed environment variable instructions, and refactoring the configuration loading process.

Configuration and Environment Variables:

  • Added support for generating a sample .env file using the gic --create-sample-dotenv command. (cmd/root.go, README.md) [1] [2] [3] [4] [5]
  • Updated the README with detailed instructions on setting environment variables for different service providers (OpenAI, Azure, Ollama). (README.md) [1] [2] [3]

Codebase Refactoring:

  • Refactored the configuration loading process to include environment variables for connection details. (internal/config/config.go) [1] [2] [3]
  • Removed the internal/cli/cli.go file, consolidating environment variable loading into the configuration package. (internal/cli/cli.go)

Dependency Updates:

  • Updated dependencies in go.mod to their latest versions. (go.mod)

Refactor the config package to manage connection settings via a new ConnectionConfig struct, loading values from environment variables. Remove cli.go as its functionality has been integrated into the config handling.

Add a method to create a sample `.env` file for easier environment setup. Enhance validation for the connection configuration to check for required environment variables based on the selected service provider.

BREAKING CHANGE: This refactor changes the structure of the configuration management and requires updating the environment variable setup in the deployment.
…es setup

Update the README to include detailed instructions for setting environment variables required for LLM connections. Added clarification on the supported connection types and provided an example `.env` file.

Also, modified the sample configuration to ensure it matches the new structure and updates in the code regarding the handling of different connection types and their corresponding configuration values.
…iguration

Eliminate tokens related code in config management to streamline configuration handling. The `Tokens` field in `ConnectionConfig` and associated environment variable handling have been removed for simplification.

No functional changes were introduced since this refactor serves to enhance code clarity.
…n README

- Introduce a new .gic configuration file to enhance the commit message generation process.
- Update README with instructions for generating a sample .env file and configuring connections for OpenAI, Azure, and Ollama.
- Remove outdated sample.gic.yaml file to streamline documentation.
…prove formatting and linting

Add package documentation for the cmd module, improve `makefile` commands to format code with `goimports`, and include a linting fix command that automatically corrects issues. Additionally, update the usage of azopenai's ChatRequestSystemMessageContent for better integration with Azure SDK.

Related to changes in dependencies and configurations, various package versions were updated in `go.mod` and `go.sum`.
…sistency

Updated struct and function names for uniformity in naming conventions across the configuration management code.
Refactor error handling in the logger to provide clearer distinction between error and warning logs. This includes renaming the logging method comment from "Error" to "Warn" for proper documentation.
@jsburckhardt jsburckhardt self-assigned this Nov 20, 2024
@jsburckhardt jsburckhardt merged commit 2d1d70d into main Nov 20, 2024
2 checks passed
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.

1 participant
0