deeppavlov / chatsky

Chatsky is a free and open-source software stack for creating chatbots, released under the terms of Apache License 2.0.
https://deeppavlov.github.io/chatsky/
Apache License 2.0
32 stars 9 forks source link

Feat/llm responses #376

Open NotBioWaste905 opened 3 months ago

NotBioWaste905 commented 3 months ago

Description

Added functionality for calling LLMs via langchain API for utilizing them in responses and conditions.

Checklist

List here tasks to complete in order to mark this PR as ready for review.

To Consider

RLKRo commented 3 months ago

I got an idea for more complex prompts: we can allow passing responses as prompts instead of just strings.

And then it'd be possible to incorporate slots into a prompt:

model = LLM_API(prompt=rsp.slots.FilledTemplate("You are an experienced barista in a local coffeshop."
"Answer your customers questions about coffee and barista work.\n"
"Customer data:\nAge {person.age}\nGender: {person.gender}\nFavorite drink: {person.habits.drink}"
))