Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
necosta committed Jun 2, 2023
1 parent 31b60dd commit 885dde1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io.circe.Decoder

trait PromptTemplate[A] {

def chain[B: ScalaSerialDescriptor: Decoder](template: String): B
def chain(template: String): A

extension (a: A) {
def chain[B: ScalaSerialDescriptor: Decoder](template: A => String): B =
Expand All @@ -19,4 +19,4 @@ object PromptTemplate:

inline final def derived[A: ScalaSerialDescriptor: Decoder]: PromptTemplate[A] = new PromptTemplate[A]:

def chain[B: ScalaSerialDescriptor: Decoder](template: String): B = ai(prompt[B](template))
def chain(template: String): A = ai(prompt[A](template))

0 comments on commit 885dde1

Please sign in to comment.