Skip to content

Commit

Permalink
gemi tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jun 2, 2024
1 parent f37cdbf commit 60ea569
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions fish/aliases.fish
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,26 @@ alias brew_update="brew -v update; brew upgrade --force-bottle --cleanup; brew c
alias update_brew_npm_gem='brew_update; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update --no-document'


abbr gemini "llm -m gemini-1.5-pro-latest"

function gemi
# using https://github.com/simonw/llm-gemini and llm
if test -n "$argv[1]"
llm prompt -m gemini-1.5-pro-latest $argv[1] | deno run --allow-env --allow-read --allow-run bin/render-streaming-markdown.ts
else
# no args? chat. otherwise use prompt, and allow unquoted stuff to work too
# gemi
# gemi tell me a joke
# gemi "tell me a joke"
if test -z "$argv[1]"
# no markdown parsing here without some real fancy stuff. because you dont want to send to markdown renderer (glow) inbetween backticks, etc.
llm chat --continue -m gemini-1.5-pro-latest
else
llm prompt -m gemini-1.5-pro-latest "$argv" && echo "⬇️… and now rendered…⬇️" && llm logs -r | glow
end
end

function openai
# using llm. same dealio as above
if test -z "$argv[1]"
llm chat --continue -m gpt-4o
else
llm prompt -m gpt-4o "$argv" && echo "⬇️… and now rendered…⬇️" && llm logs -r | glow
end
end

Expand Down

0 comments on commit 60ea569

Please sign in to comment.