Skip to content

Commit

Permalink
feat: add colang history to generation logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pouyanpi committed Oct 11, 2024
1 parent 9a01095 commit cf63e33
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nemoguardrails/rails/llm/llmrails.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,11 @@ async def generate_async(
res.log = GenerationLog()

res.log.internal_events = new_events
# TODO: figure out what is the issue here
if options.log.colang_history:
if res.log is None:
res.log = GenerationLog()
res.log.colang_history = get_colang_history(events=events)
if options.llm_output:
# Currently, we include the output from the generation LLM calls.
for activated_rail in _log.activated_rails:
Expand Down

0 comments on commit cf63e33

Please sign in to comment.