-
Notifications
You must be signed in to change notification settings - Fork 234
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
Add Documentation For New CLI Commands #1119
Conversation
docs/cli/variant_add.mdx
Outdated
- By using a configuration file | ||
- By creating it from an existing variant | ||
|
||
#### Creating a variant from an existing variant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the motivation behind this command. Does this create a config file too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the motivation behind this command. Does this create a config file too?
@mmabrouk
The command uses the parameters defined in a valid toml file to create a new variant, and afterwards pulls the configuration from the backend and saves it in that variant config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still don't understand. The command is
agenta variant add --from <variant_name>
Where is the valid toml file???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The agenta variant add
and agenta variant add --from_variant <variant_name>
would use the config file of the variant that is selected to be the base variant.
Only the agenta variant add --config_file <codebase_name>.<config_name>.toml
explicitly defines the config file to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still don't understand. What does it mean "would use the config file of the variant that is selected to be the base variant"? Can you please give me an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Option 1
agenta config pull
cp app.default.toml app.mynewconfig.toml
nano app.mynewconfig.toml
agenta add-config app.newconfig.toml
Option 2
agenta variant add --from app.default
nano app.mynewconfig.toml
agenta config update app.mynewconfig.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @devgenix !
Please note that this should be merged to docs_v2 branch and not main
yes, however not all the commands in all the details. the using cli is a short howto guide while the developer_guides is a reference (read about the difference here https://diataxis.fr/) |
Configurations are specified in toml files and always named `<codebase_name>.<configuration_name>`. | ||
> When you serve your first app variant, the configuration of the created app variant is pulled from the Backend and saved in a toml file named `<codebase_name>.<configuration_name>.toml` | ||
> | ||
> <img width="239" alt="image" src="https://github.com/Agenta-AI/agenta/assets/56418363/da80dd1b-c308-4ad0-baea-396ae727ba77" /><img width="700" alt="image" src="https://github.com/Agenta-AI/agenta/assets/56418363/d70cfa07-dc9a-4486-8090-54ba5a32bd3e" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devgenix I don't understand the content of the config.toml??
Why do we have config_id, current_version, created_at, version history, and lots and lots of useless stuff. It is supposed to be a human readable format to specify the configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmabrouk Oh, initially I had it in mind to save only the parameters gotten from the configuration but when I asked you mentioned that I pull and save everything; https://agenta-hq.slack.com/archives/D05MTU0FWH2/p1703016946840149?thread_ts=1703013964.710329&cid=D05MTU0FWH2
But what do you have in mind that the configuration are formatted?
This PR adds to the documentation, basic guides to using agenta from CLI
Resolves #1118