radareorg / r2ai

local language model for radare2
https://www.radare.org
MIT License
104 stars 17 forks source link

Models list refactor #14

Closed dnakov closed 4 months ago

dnakov commented 8 months ago
          This list is somehow getting too large and confusing for users who start using it. Maybe we can have -mm for the fullist, -m keeping a short/compactist of suggestions ans -m? to document it for humans

Originally posted by @trufae in https://github.com/radareorg/r2ai/issues/12#issuecomment-1996306314

dnakov commented 8 months ago

Maybe something interactive like this, lmk what you think: r2ai -P (provider) goes into interactive selection [*] openai [ ] anthropic [ ] local (gguf) [ ] local (other)

Next is (say you chose openAI): [ ] gpt-3.5-turbo [] ... etc

The result would be the same as -m <model_name> Also, you could do r2ai -P openai and it'll just select the default model for that provider

I think we should keep the -M for a list of all models that we've actually tried running ourselves.

trufae commented 8 months ago

What about -mm instead? This way its easier to remember, but i like the idea of default providers. For local i use utopia a lot but that doesnt work for auto mode, and i think we should simplify the process of choosing the model by giving some defaults because 99% of users wont test and compare all models to choose one

trufae commented 7 months ago

ive added the -MM flag, can you check this out? also i did several more improvement and added a setup.py with the r2ai program. so in theory doing pip install r2ai will make 'r2ai' to be available in the path. its the first time doing this, so i would like to have a double check if you know how that works.

dnakov commented 7 months ago

setup.py seems good. r2ai works fine with pip install . I made a small update to get the relative path in main.py so that you can still invoke it with r2 -i main.py

trufae commented 7 months ago

I have implemented autocompletion for -m, this may be useful too. also we can eventually use promptkit.

trufae commented 4 months ago

done