Add genai command for interacting with LLMs for generating IaC files #213
Add genai command for interacting with LLMs for generating IaC files #213santoshkal merged 41 commits intopre-mainfrom
Conversation
DryRun Security SummaryThe pull request covers a wide range of functionality related to a command-line application called "GenAI" that interacts with Large Language Models (LLMs) to generate secure infrastructure-as-code (IaC) configurations, with a focus on user input handling, configuration management, file integrity validation, dependency management, and secure coding practices. Expand for full summarySummary: The code changes in this pull request cover a wide range of functionality related to a command-line application called "GenAI" that interacts with Large Language Models (LLMs) to generate secure infrastructure-as-code (IaC) configurations. The changes include the addition of new commands, the management of LLM resources, the handling of user input and configuration, and the implementation of file integrity validation mechanisms. From an application security perspective, the key areas that require careful review and consideration are:
Files Changed:
Code AnalysisWe ran
Riskiness🟢 Risk threshold not exceeded. |
Signed-off-by: Santosh <ksantosh@intelops.dev>
Merged OllamaClient in the config struct and removed a redunant ollamaClient struct.
created a function to create a default endpoint and use it incase --endpoint == "", else use e.Host, e.Port Update envconfig to use env variables for LLM parameters
Signed-off-by: Santosh <ksantosh@intelops.dev>
remove backend and API configs collection from init command First working code for - genai init command that downloads all the required systemPrompts and list of supported tools to user's local directory - genai command that pulls the markdown file from local and check is the user has provided a supported tool in genai args - Mapps supported tool with the available systemPrompt stored in users local and pulls for generateing the Chat completion First working code for - genai init command that downloads all the required systemPrompts and list of supported tools to user's local directory - genai command that pulls the markdown file from local and check is the user has provided a supported tool in genai args - Mapps supported tool with the available systemPrompt stored in users local and pulls for generateing the Chat completion
TODO: Add validation to check if valid parameters are supplied by the user
- TODO: Refactor redundant code - TODO: Test with multiple models from same vendor - TODO: Test Ollama backend
beb3d96 to
7a510f2
Compare
Adds Genai command to interact with LLM Backends and generate IaC files