diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2024-02-27 12:53:16 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2024-02-27 12:53:16 +0000 |
commit | 526a3e84b181e4108412686a0d185714e1ccf51e (patch) | |
tree | f8684cd70d4b1f7edc5f7ca3ee80f3210232648e | |
parent | b5e7a1d7d2adb3670824d726573cc08157a02b69 (diff) | |
download | noetic-llama-526a3e84b181e4108412686a0d185714e1ccf51e.tar.gz noetic-llama-526a3e84b181e4108412686a0d185714e1ccf51e.zip |
Updated README.md
-rw-r--r-- | README.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..e955c56 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# noetic-llama + +ROS Noetic Wrapper for ollama, allowing for function calling + +Given a python library [`capabilities`](/noetic-llama/src/ollamawrapper/src/capabilities) containing only functions, it inspects this library to generate an initial prompt to tell the +LLM the possible functions. Then, with a ROS service call, these functions are called: + +`rosrun ollamawrapper ollamawrapper` + +`rosservice call /ollama_wrapper "input: What the weather like in Seattle right now? What's 14 plus 217? What's 0 + 1?"` + +Response: + +``` +Recieved ollama request 'What the weather like in Seattle right now? What's 14 plus 217? What's 0 + 1?' +get_weather_data(coordinates=get_coordinates_from_city(city_name='Seattle')): +By 'Seattle' I am assuming you mean 'Seattle, WA' +The current temperature is 0.100000°C with an outlook of 'Clear sky' +add(num1=14, num2=217): +14.000000 + 217.000000 = 231.000000 +add(num1=0, num2=1): +0.000000 + 1.000000 = 1.000000 +``` + +## TODOs + + - [ ] Make a proper parser for the function calls returned by ollama instead of just using `exec()`, this will allow us to fetch the return value of the functions, and it's also much safer. A grammar has already been made, see [ollamafunctiongrammar.ppeg](/noetic-llama/src/ollamawrapper/src/ollamafunctiongrammar.ppeg), just need to finish the abstract syntax tree parsing (see [parser.py](/noetic-llama/src/ollamawrapper/src/parser.py)) + - [ ] Fix the docker container. I've been working in an Ubuntu 20.04 VM so far |