Skip to content

Commit

Permalink
Update CHANGELOG.
Browse files Browse the repository at this point in the history
  • Loading branch information
drazvan committed Jul 13, 2023
1 parent 00b3a6b commit af493c5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#58](https://github.com/NVIDIA/NeMo-Guardrails/issues/58): Fix install on Mac OS 13.
- [#55](https://github.com/NVIDIA/NeMo-Guardrails/issues/55): Fix bug in example causing config.py to crash on computers with no CUDA-enabled GPUs.
- Fixed the model name initialization for LLMs that use the `model` kwarg.
- Fixed the Cohere prompt templates.


## [0.3.0] - 2023-06-30
Expand Down
27 changes: 0 additions & 27 deletions nemoguardrails/llm/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,30 +151,3 @@ def last_turns(colang_history: str, n: int) -> str:
i -= 1

return "\n".join(lines[i:])


#
# def last_turns(colang_history: str, n: int) -> str:
# """Returns the last n turns from a given colang history."""
# lines = colang_history.split("\n")
# # Remove empty lines
# lines = [line for line in lines if len(line.strip()) > 0]
# lines.reverse()
#
# turn_count = 0
# diads = []
# last_diad_id = -1
# i = 0
# while i < len(lines):
# if lines[i].startswith('user "'):
# turn_count += 1
# diad_turns = lines[last_diad_id + 1 : i + 1]
# diad_turns.reverse()
# diads.append("\n".join(diad_turns))
# last_diad_id = i
# if turn_count == n:
# break
# i += 1
#
# diads.reverse()
# return "\n".join(diads)

0 comments on commit af493c5

Please sign in to comment.