Pipes library examples #1338
Replies: 1 comment 1 reply
-
Could you expand on that a little more? I'm not sure what you mean or what code is commented out?
It's a little bit of a hack I suppose, so not perfect, but without the full monad transformer capability you are a bit limited. |
Beta Was this translation helpful? Give feedback.
-
Use case:
I'm trying to write a console app that communicates sends the conversation to chatgpt and writes the response to console (the actual application is a bit more complicated).
The current code is done imperatively like this (pseudo code for readability).
Problem:
For Proxy<RT, UOut, UIn, DIn, DOut, A>, I can't find any samples that use DIn or UOut.
I assume I want to stream in both directions since both the console and the LLM (chatgpt) are stateful. I don't know what types I should use for Din, UOut, A, etc. I'm also unsure where IMachine fits (does RT contain both Console and LLM?).
Update:
The following code works for synchronous chat but there's a few issues:
Beta Was this translation helpful? Give feedback.
All reactions