C-Loftus / talon-ai-tools

Query LLMs and AI tools with voice commands
http://colton.place/talon-ai-tools/
MIT License
54 stars 21 forks source link

Clarify some of the context behavior before refactoring #128

Closed C-Loftus closed 3 months ago

C-Loftus commented 3 months ago

https://github.com/C-Loftus/talon-ai-tools/blob/69845f3fea97c6d7ca83e8df0d30bc7d51a50db9/lib/modelHelpers.py#L175-L185

There are a few places within the payload generation function where the behavior is a bit unclear. Here for instance we have a check against the variable __CONTEXT__ but this literal does not appear anywhere in the code. Just want to be clear on some things before I refactor the context code.

We are also add the thread just by adding the list to the previous one. Wanted to confirm this is proper.

We should try to be using as strict type checking as possible to make our code very explicit. We have a lot of edge cases and every PR risks breaking things.

jaresty commented 3 months ago

We are also add the thread just by adding the list to the previous one. Wanted to confirm this is proper.

The thread behavior is intentional there-we don't want to include the thread on every request, just the requests that are using the thread modifier (at least until we decide to do some kind of a toggle)

jaresty commented 3 months ago

We should try to be using as strict type checking as possible to make our code very explicit. We have a lot of edge cases and every PR risks breaking things.

100% agree. I'm doing the best I can-unfortunately there are not types in talon script so those are a little challenging to catch.

C-Loftus commented 3 months ago

We should try to be using as strict type checking as possible to make our code very explicit. We have a lot of edge cases and every PR risks breaking things.

100% agree. I'm doing the best I can-unfortunately there are not types in talon script so those are a little challenging to catch.

Sounds good. And that above comment was not about your code, just a statement about the codebase in general and something I was considering adding to the contributing docs.

C-Loftus commented 3 months ago

Fixed with latest PR #129