diff --git a/agentic/src/SmithyOpenAIUtil.scala b/agentic/src/SmithyOpenAIUtil.scala index 46979f7..08b0fc5 100644 --- a/agentic/src/SmithyOpenAIUtil.scala +++ b/agentic/src/SmithyOpenAIUtil.scala @@ -18,10 +18,7 @@ import software.amazon.smithy.model.node.Node import scala.annotation.experimental -/** These are toy interpreters that turn services into json-in/json-out functions, and vice versa. - * - * Created for testing purposes. - */ +// format: off val ioToolGen = new SmithyOpenAIUtil[IO] class SmithyOpenAIUtil[F[_]](implicit F: MonadThrow[F]): @@ -35,7 +32,7 @@ class SmithyOpenAIUtil[F[_]](implicit F: MonadThrow[F]): docOpt.toOption.get end toJsonSchema - // format: off + @experimental def openAiSmithyFunctionDispatch[Alg[_[_, _, _, _, _]]]( alg: FunctorAlgebra[Alg, F] @@ -54,7 +51,7 @@ class SmithyOpenAIUtil[F[_]](implicit F: MonadThrow[F]): jsonEndpoint(fctConfig) case None => F.raiseError(new Throwable(s"Function $m not found")) end match - // format: on + private def toLowLevel[Op[_, _, _, _, _], I, E, O, SI, SO]( polyFunction: PolyFunction5[Op, Kind1[F]#toKind5], @@ -88,4 +85,6 @@ class SmithyOpenAIUtil[F[_]](implicit F: MonadThrow[F]): // println(Json.writeDocumentAsPrettyString(output)) output end toLowLevel + end SmithyOpenAIUtil +// format: on \ No newline at end of file diff --git a/justfile b/justfile index da9cc9e..df1ef3f 100644 --- a/justfile +++ b/justfile @@ -17,6 +17,9 @@ fix: site: mill -j 0 -w site.live +test: + mill -j 0 __.test + demo: scala-cli run . --main-class io.github.quafadas.dairect.Showcase diff --git a/site/src/research.scala b/site/src/research.scala index 74e1ece..5d6e4b1 100644 --- a/site/src/research.scala +++ b/site/src/research.scala @@ -22,7 +22,7 @@ object Researcher extends IOApp.Simple: val clientR = EmberClientBuilder.default[IO].build val bot: Resource[IO, ChatGpt] = ChatGpt.defaultAuthLogToFile(logFile, clientR) val serp = clientR.flatMap(c => Serp(fileLogger(logFile)(c))) - val fetcher = clientR.map(UrlReader(_)) + val fetcher = clientR.map(UrlReader(_)) val startMessages: List[AiMessage] = List( AiMessage.system(