Skip to content
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

[Proposal] Implement Global Configuration and Scripts for genaiscript #834

Open
borgius opened this issue Nov 7, 2024 · 6 comments
Open

Comments

@borgius
Copy link

borgius commented Nov 7, 2024

Proposition: Global Genai Scripts

Core Functionality

  1. Add a ~/.genai file for global configuration:
    • Allow specifying a folder for global Genai scripts (e.g., globalScripts)
    • Allow setting global configuration for all Genai models
    • Allow changing the .env filename in a project (e.g., storing a .env file with global config in the repo, while using .env.local in .gitignore)

VSCode Extension

  1. Add a setting to specify the location of the global config file (~/.genai by default)
  2. Add a new global folder to list scripts from the globalScripts folder

Rationale

Currently, it's required to save global Genai scripts within the current project's directory. This can be inconvenient, as users may want to maintain a set of global scripts that can be used across multiple projects.

By introducing a global configuration file (~/.genai) and allowing users to specify a folder for global scripts, users can more easily manage and reuse their Genai scripts across different projects. This will improve the overall developer experience and make it easier to maintain a consistent set of global Genai scripts.

The VSCode extension updates will further enhance the user experience by providing a dedicated interface for accessing and managing the global Genai scripts, making it more discoverable and accessible for developers.

@pelikhan
Copy link
Member

pelikhan commented Nov 8, 2024

Sounds good. What kind of format would you typically want this file to be?

@borgius
Copy link
Author

borgius commented Nov 8, 2024

YAML would be the preferred choice, with JSON as a secondary option.

@pelikhan
Copy link
Member

Start of global config in #858

@pelikhan
Copy link
Member

@borgius in 1.75.0, you can start to specify a global .env with the configuration files at https://microsoft.github.io/genaiscript/reference/configuration-files/

@pelikhan
Copy link
Member

(1.75.0 is live).

@pelikhan
Copy link
Member

@borgius the configuration files now support a include filed that can be used to add additional globs to list global scripts. https://microsoft.github.io/genaiscript/reference/configuration-files/#include-property

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

No branches or pull requests

2 participants