Discover my latest contributions and projects on GitHub.
Explore more of my work at https://schneiderfelipe.github.io/.
echo "It's dangerous to go alone" | ellie
License: MIT License
Discover my latest contributions and projects on GitHub.
Explore more of my work at https://schneiderfelipe.github.io/.
Currently, the results of a function call are given back to the AI exactly how they are received.
We could try to parse zero, one or more JSON objects out of it and, in case we're able to parse more than one, we might compact each and send a subset of context-relevant objects instead of all of them.
This would free functions from the burden of trying to keep their responses to a minimum, and instead encourages functions to just split their results as much as possible, leaving to ellie to choose the most relevant ones, since ellie is aware of the conversation context.
serde_json::StreamDeserializer
is probably the right way of doing it.
Lines 42 to 52 in 487ec27
Applications such as ripgrep already produce that kind of output with the --json
flag:
$ rg todo -i --json
{"type":"begin","data":{"path":{"text":"src/functions.rs"}}}
{"type":"match","data":{"path":{"text":"src/functions.rs"},"lines":{"text":" // TODO: ignore provider if spec fails,\n"},"line_number":150,"absolute_offset":4585,"submatches":[{"match":{"text":"TODO"},"start":15,"end":19}]}}
{"type":"end","data":{"path":{"text":"src/functions.rs"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":17536,"human":"0.000018s"},"searches":1,"searches_with_match":1,"bytes_searched":4890,"bytes_printed":297,"matched_lines":1,"matches":1}}}
...
And applications such as jq already accept the same kind of input as above.
ellie does not currently know about previous interactions. It should get the previous chat history every time in the future.
It should get the immediate chat context by using chat-splitter, possibly look further in the past for more relevant information, and add a suitable system message right before sending the context to the AI model.
Lines 93 to 110 in 74260d1
ellie currently uses a default client for requesting from the OpenAI's API endpoint. Consider giving more options to it, such as for configuring timeout, back-off strategy and probably caching.
Lines 275 to 290 in 74260d1
Currently ellie throws away messages exchanged in each interaction. It should store them for use as context in future interactions (#9). Storing should happen atomically: either all messages in a given interaction are stored or, in case of an error, none are stored (interactions with no function calling have an user-assistant message pair, which is probably the most common case).
Lines 273 to 303 in 74260d1
After #12 and #9, support a git commit
-like interface for modifying the previous interaction (ellie --refine
):
The key thing is to make it extremely easy to
ellie currently sends all known specifications to the AI model. It should mildly select relevant functions based on chat context instead, in a way steering the mode towards more focused decisions and saving token costs.
Lines 112 to 138 in 74260d1
ellie currently crashes if a provider fails when we request its specification. We should ignore the provider in those cases and give a warning instead. "Ignoring" here means the AI model will never know about the function to start with.
Lines 149 to 162 in 74260d1
EDIT: This could also apply to malformed specifications1 (i.e., the provider runs fine, but a bad specification is given). It is fine to ignore said function by the same logic as above.
Lines 170 to 187 in 13e9e66
The minimal specification seems to have name
and parameters
, and the parameters
have a type
and properties
. โฉ
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.