Add relevant chunks for generate_flow_continuation and generate_user_intent_and_bot_action_from_user_action tasks
tested with abc_v2 config (also for meta/llama3-70b-instruct) without kb folder.
from nemoguardrails import LLMRails, RailsConfig
config = RailsConfig.from_path("./examples/bots/abc_v2")
rails = LLMRails(config)
response = rails.generate(messages=[{
"role": "context",
"content": {
"relevant_chunks": """
Employees are eligible for the following time off:
* Vacation: 15 days per year, accrued monthly.
* Sick leave: 25 days per year, accrued monthly.
* Personal days: 5 days per year, accrued monthly.
* Paid holidays: New Year's Day, Memorial Day, Independence Day, Thanksgiving Day, Christmas Day.
* Bereavement leave: 3 days paid leave for immediate family members, 1 day for non-immediate family members. """
}
},{
"role": "user",
"content": "How many sick leaves do employees have?"
}])
Add relevant chunks for
generate_flow_continuation
andgenerate_user_intent_and_bot_action_from_user_action
taskstested with abc_v2 config (also for meta/llama3-70b-instruct) without kb folder.
response["content"] must contain 25 days.