Simple prompt in custom action or iex shell
I can't seem to figure out how to do a simple prompt i.e. one prompt - one response. What would be the simplest way using AshAi? How could I do it directly in shell?
I was playing around
AshAi.Actions.Prompt.run/3
but couldn't grok it.
this is how my action starts. not sure if I can put somewhere the builtin prompt call :thinkies:3 Replies
Running the action does the prompt
Did you try running it?
I did try but since its oban triggered I don't see what breaks, so I tried in shell using the run. I see what breaks but still can't figure out how to fill the call.
how could I do a custom prompt and process the response after it, also custom, in my custom action
Ah, so if thats what you want to do I think you want to write your own calls to LangChain
The way that
AshAi
works with the prompt action, is tha tyou provide a return type to the action
You don't post-process the output, you get that type of data back
so it works like a black-box Ash action
You can customize the prompt though
those are eex templates
run prompt(...., prompt: {"<%= @input.arguments.... %>", "user_message"})