Skip to content

[Go] rewrite ai/prompt.go to match JS more closely #356

@jba

Description

@jba

Currently, we distinguish between a Prompt interface and the prompt action.
In the JS, and now in the rest of the Go ai package, the former interfaces are now type aliases for actions.
Also, in the JS, the action of a prompt is to render it, not to generate text from it.

Rewrite the general prompt API to conform more closely to what the JS does (js/ai/src/prompt.ts).
The JS PromptAction is generic in its input, so we can't use a type alias; we will need a new generic type.
We should also change the action to render.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions