-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/import feature successor #507
Comments
Cool thing is that we could also allow these patterns to match ai responses...eg provide a custom-handler button to validate chatcraft Dockerfile output when following conditions match handler_url: https://some/url/with-dockerfile/validator
match: "^```docker"
options:
multiline: true
model_output: true
user_input: false We could move all run-on-server stuff to this |
Obviously one could build a complex ui over this, but yaml gets us going sooner |
I would like to get the following example working in first rev of this feature: handler_url: /proxy
method: GET
match: "$\/import https?:\/\/\S+"
---
handler_url: https://taras-scrape2md.web.val.run/
match: "$https?:\/\/\S+" We should eval regexps sequentially until one of them matches |
I was thinking oh why the current import feature feels wrong.
I can't change it easily. Proposal: /http command to run arbitrary HTTP requests from CloudFlare #473 as proposed is an overly fancy fix
I don't like /commands cos they are hard to type on mobile and they cause issues like Chatcraft commands conflict with code errors #500
Security aspect restricting /import to logged in users makes for terrible github login UX on mobile browsers/PWA
fact that the command disappears after we run it
I also dont like that we press
ask gpt
to do something that gpt has nothing to do with.So I have have the simplest possible solution. Allow one to define POST commands via a yaml textbox in chatcraft options. Eg we would implement current solution by having a default value:
this would match current behavior of sending commands that look like
/import https://www.example.com/file.pdf
/import https://www.google.com/file.png
So upon pressing enter:
/import?message=/import%20https://www.google.com/file.png
Response from that url endpoint should then be SSE streamed(can be a followup) back into next message with a clear indicator that it came from chatcraft itself. The endpoint could choose to provide an error message, such as asking for auth.
Since I want a behavior where I can paste urls in without any typing and I wanna use scrape2md, I would extend this with
We could later consider auth variables like $GITHUB_AUTH_TOKEN to this.
This seems easy to implement and could be very extensible. yaml should get validated and not let user save changes unless it matches some schema. This could also be done in a followup.
The text was updated successfully, but these errors were encountered: