langchain4j [特性] UX:可观察性:简约日志记录

kadbb459  于 3个月前  发布在  其他
关注(0)|答案(1)|浏览(19)

当调试来自ChatLanguageModel的请求/响应时,它太嘈杂了。如果能有一个选项启用简约逻辑,而不是这样,那就更好了:

----------------------------------->
[System]: You are a helpful assistant
[User  ]: Hello
[AI    ]: Hi, how can I help you?
[User  ]: Tell me a joke
----------------------------------->
<-----------------------------------
[AI    ]: Why did the math book look sad? Because it had too many problems.
<-----------------------------------

如果请求包含工具,它们应该格式化得很好:

----------------------------------->
[System]: You are a helpful assistant
[User  ]: What's the weather in Munich?
--------
[Tools ]: getWeather(location)
----------------------------------->

如果响应中有工具执行请求,它们也应该格式化得很好:

<-----------------------------------
[AI    ]: [Tools]: getWeather("Munich")
<-----------------------------------

相关问题