mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 06:12:27 +00:00
Invent new cosmo_args() api
This function offers a more powerful replacement for LoadZipArgs() which is now deprecated. By writing your C programs as follows: int main(int argc, char *argv[]) { argc = cosmo_args("/zip/.args", &argv); // ... } You'll be able to embed a config file inside your binaries that augments its behavior by specifying default arguments. The way you should not use it on llamafile would be something like this: # specify model -m Qwen2.5-Coder-34B-Instruct.Q6_K.gguf # prevent settings below from being changed ... # specify system prompt --system-prompt "\ you are a woke ai assistant\n you can use the following tools:\n - shell: run bash code - search: ask google for help - report: you see something say something" # hide system prompt in user interface --no-display-prompt
This commit is contained in:
parent
5ce5fb6f2a
commit
4e9566cd33
5 changed files with 777 additions and 0 deletions
|
@ -133,6 +133,7 @@ int LoadZipArgsImpl(int *argc, char ***argv, char *data) {
|
|||
* replaced with whatever CLI args were specified by the user.
|
||||
*
|
||||
* @return 0 on success, or -1 if not found w/o errno clobber
|
||||
* @deprecated please use `cosmo_args()` it's more powerful
|
||||
*/
|
||||
int LoadZipArgs(int *argc, char ***argv) {
|
||||
int e;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue