microsoft / TypeChat

TypeChat is a library that makes it easy to build natural language interfaces using types.
https://microsoft.github.io/TypeChat/
MIT License
8.06k stars 379 forks source link

How to log the prompt generated by typechat? #181

Closed superwangnan closed 4 months ago

superwangnan commented 4 months ago

Hi team, Thanks for great job at first :). I am a newbie for Typechat. As I understand, typechat will generate prompt based on customer query and response schema. So, I want to know if we have any setting to make typechat log or show the prompt generated? Thanks

olawalejuwonm commented 4 months ago

You can play with the source code to do that.

I've done that in the past, it's more of prompt engineering instructing the model to act as service that generate response based on the interface.

In your node module, check the folder for typechat, review the code and console createTranslator (or similar variable name)

On Thu, Feb 15, 2024, 10:40 Wang, Nan @.***> wrote:

Hi team, Thanks for great job at first :). I am a newbie for Typechat. As I understand, typechat will generate prompt based on customer query and response schema. So, I want to know if we have any setting to make typechat log or show the prompt generated? Thanks

— Reply to this email directly, view it on GitHub https://github.com/microsoft/TypeChat/issues/181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMSQ2BBPVXS3HTSOZMQZWLLYTXJZFAVCNFSM6AAAAABDJ5ELJ6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZTMMBWHAYDGNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

superwangnan commented 4 months ago

Got it! Thanks