corrected some layout and added headings
This commit is contained in:
parent
ea202219ba
commit
b7ddd8270e
@ -7,18 +7,21 @@
|
|||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
_This post was written longhand. Conversion to text was done with MyScript Notes, I did some minor manual edits to correct words and explain a few things (in parentheses).
|
_This post was written longhand_. Conversion to text was done with MyScript Notes, I did some minor manual edits to correct words and explain a few things (in parentheses).
|
||||||
|
|
||||||
|
|
||||||
I see a few people writing about sharing struggles with Large language models, saying we are all still figuring this out.
|
I see a few people writing about sharing struggles with Large language models, saying we are all still figuring this out.
|
||||||
|
|
||||||
For me it is easier to do at the moment of a small success.
|
> For me it is easier to do at the moment of a small success.
|
||||||
|
|
||||||
The other day I tried to develop an extension for [Pi](https://shittycodingagent.ai). I want to stop a model when it goes off the rails.
|
Stopping a model when it goes off the rails - but automated
|
||||||
|
---
|
||||||
|
|
||||||
|
The other day I tried to develop an extension for [Pi](https://shittycodingagent.ai) (a coding agent). I want to stop a model when it goes off the rails.
|
||||||
|
|
||||||
I now have a local model that is fast, can call tools (search, run test, edit code etc.). It does, however, perform some model assisted coding quirks frequently:
|
I now have a local model that is fast, can call tools (search, run test, edit code etc.). It does, however, perform some model assisted coding quirks frequently:
|
||||||
|
|
||||||
- Replace production code that Works With throwing an exception
|
- Replace _production code that works_ with _throwing an exception__
|
||||||
- Write if statements in tests
|
- Write if statements in tests
|
||||||
- Add fallbacks for things that can't fail
|
- Add fallbacks for things that can't fail
|
||||||
- Find "problems" in code that works (passes tests + other checks, works for the user etc)
|
- Find "problems" in code that works (passes tests + other checks, works for the user etc)
|
||||||
@ -31,7 +34,7 @@ Looks simple, so I let a more powerful but slower local model figure out how to
|
|||||||
|
|
||||||
> Pi can explain its own features and look up its docs. Ask it how to use or extend Pi.
|
> Pi can explain its own features and look up its docs. Ask it how to use or extend Pi.
|
||||||
|
|
||||||
After some iteration we had a plan and Pi generated d plausible looking extension.
|
After some iteration we had a plan and Pi generated a plausible looking extension.
|
||||||
|
|
||||||
I tested it manually, in Pi. Nothing happened. Back to the drawing board.
|
I tested it manually, in Pi. Nothing happened. Back to the drawing board.
|
||||||
|
|
||||||
@ -42,6 +45,7 @@ Eventually I installed the sample extension. That worked. Then I deleted most of
|
|||||||
extension, added some logging - I could see something.
|
extension, added some logging - I could see something.
|
||||||
|
|
||||||
I learned quite a bit about Pi and its extension mechanism.
|
I learned quite a bit about Pi and its extension mechanism.
|
||||||
|
---
|
||||||
|
|
||||||
It looks like only the last "UI notification" gets shown for any exension point (e.g. a tool call or system startup). I am not yet sure if this is by design or not.
|
It looks like only the last "UI notification" gets shown for any exension point (e.g. a tool call or system startup). I am not yet sure if this is by design or not.
|
||||||
|
|
||||||
@ -54,11 +58,12 @@ This also required experimentation. I did not want to set up a separate project
|
|||||||
- Learn that Pi auto loads any thing in the extensions folder. If you put a test there, Pi crashes. (the test does not have the method that defines an extension. All files in `.pi/agent/extensions` must have it.)
|
- Learn that Pi auto loads any thing in the extensions folder. If you put a test there, Pi crashes. (the test does not have the method that defines an extension. All files in `.pi/agent/extensions` must have it.)
|
||||||
- Learn that "domain" files also don't work there. (I wanted to have the extension files thin and the testable functions separate. So that the tests don't depend on `pi` and its' types).
|
- Learn that "domain" files also don't work there. (I wanted to have the extension files thin and the testable functions separate. So that the tests don't depend on `pi` and its' types).
|
||||||
|
|
||||||
|
So eventually I ended up with this design
|
||||||
|
---
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
So eventually I ended up with
|
|
||||||
|
|
||||||
```
|
```
|
||||||
- .pi / test
|
- .pi / test
|
||||||
/ core
|
/ core
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user