Skip to content

Commit

Permalink
Merge branch 'develop' into fork/aishwaryap/feature/rag_nvaif_embeddings
Browse files Browse the repository at this point in the history
  • Loading branch information
drazvan committed Jul 10, 2024
2 parents 8f5b6ec + a0df778 commit 3ee7775
Show file tree
Hide file tree
Showing 287 changed files with 11,177 additions and 1,466 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ jobs:
- name: Build Wheel
run: |
pip install build
cp -r chat-ui nemoguardrails/chat-ui
cp -r examples nemoguardrails/examples
python -m build --wheel
rm -r nemoguardrails/chat-ui
rm -r nemoguardrails/examples
echo "WHEEL_FILE=$(ls dist/*.whl)" >> $GITHUB_ENV
- name: Upload Artifact
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ eval_outputs
local_cache
# Ignore example configs created in user guides
docs/user_guides/llm/vertexai/config
# vscode local history extension
.history
94 changes: 94 additions & 0 deletions CHANGELOG-Colang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Changelog

All notable changes to the Colang language and runtime will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0-beta.2] - Unreleased

This second beta version of Colang brings a set of improvements and fixes.

### Added

Language and runtime:

* [#504](https://github.com/NVIDIA/NeMo-Guardrails/pull/504) Add colang 2.0 syntax error details by @rgstephens.
* [#533](https://github.com/NVIDIA/NeMo-Guardrails/pull/533) Expose global variables in prompting templates.
* [#534](https://github.com/NVIDIA/NeMo-Guardrails/pull/534) Add `continuation on unhandled user utterance` flow to the standard library (`llm.co`).
* [#554](https://github.com/NVIDIA/NeMo-Guardrails/pull/554) Support for NLD intents.
* [#559](https://github.com/NVIDIA/NeMo-Guardrails/pull/559) Support for the `@active` decorator which activates flows automatically.

Other:

* [#591](https://github.com/NVIDIA/NeMo-Guardrails/pull/591) Unit tests for runtime exception handling in flows.

### Changed

* [#576](https://github.com/NVIDIA/NeMo-Guardrails/pull/576) Make `if` / `while` / `when` statements compatible with python syntax, i.e., allow `:` at the end of line.
* [#596](https://github.com/NVIDIA/NeMo-Guardrails/pull/596) Allow `not`, `in`, `is` in generated flow names.
* [#578](https://github.com/NVIDIA/NeMo-Guardrails/pull/578) Improve bot action generation.
* [#594](https://github.com/NVIDIA/NeMo-Guardrails/pull/594) Add more information to Colang syntax errors.
* [#599](https://github.com/NVIDIA/NeMo-Guardrails/pull/599) Runtime processing loop also consumes generated events before completion.
* [#540](https://github.com/NVIDIA/NeMo-Guardrails/pull/540) LLM prompting improvements targeting `gpt-4o`.

### Fixed

* [#525](https://github.com/NVIDIA/NeMo-Guardrails/pull/525) Fix string expression double braces.
* [#531](https://github.com/NVIDIA/NeMo-Guardrails/pull/531) Fix Colang 2 flow activation.
* [#577](https://github.com/NVIDIA/NeMo-Guardrails/pull/577) Remove unnecessary print statements in runtime.
* [#593](https://github.com/NVIDIA/NeMo-Guardrails/pull/593) Fix `match` statement issue.
* [#579](https://github.com/NVIDIA/NeMo-Guardrails/pull/579) Fix multiline string expressions issue.
* [#604](https://github.com/NVIDIA/NeMo-Guardrails/pull/604) Fix tracking user talking state issue.
* [#598](https://github.com/NVIDIA/NeMo-Guardrails/pull/598) Fix issue related to a race condition.

## [2.0-beta] - 2024-05-08

### Added

- [Standard library of flows](https://docs.nvidia.com/nemo/guardrails/colang_2/language_reference/the-standard-library.html): `core.co`, `llm.co`, `guardrails.co`, `avatars.co`, `timing.co`, `utils.co`.

### Changed

- Syntax changes:
- Meta comments have been replaced by the `@meta` and `@loop` decorators:
- `# meta: user intent` -> `@meta(user_intent=True)` (also user_action, bot_intent, bot_action)
- `# meta: exclude from llm` -> `@meta(exclude_from_llm=True)`
- `# meta: loop_id=<loop_id>` -> `@loop("<loop_id>")`
- `orwhen` -> `or when`
- NLD instructions `"""<NLD>"""` -> `..."<NLD>"`
- Support for `import` statement
- Regular expressions syntax change `r"<regex>"` -> `regex("<regex>")`
- String expressions change: `"{{<expression>}}"` -> `"{<expression>}"`

- Chat CLI runtime flags `--verbose` logging format improvements
- Internal event parameter renaming: `flow_start_uid` -> `flow_instance_uid`
- Colang function name changes: `findall` -> `find_all` ,

- Changes to flow names that were previously part of `ccl_*.co` files (which are now part of the standard library):
- `catch colang errors` -> `notification of colang errors` (core.co)
- `catch undefined flows` -> `notification of undefined flow start` (core.co)
- `catch unexpected user utterance` -> `notification of unexpected user utterance` (core.co)
- `poll llm request response` -> `polling llm request response` (llm.co)
- `trigger user intent for unhandled user utterance` -> `generating user intent for unhandled user utterance` (llm.co)
- `generate then continue interaction` -> `llm continue interaction` (llm.co)
- `track bot talking state` -> `tracking bot talking state` (core.co)
- `track user talking state` -> `tracking user talking state` (core.co)
- `track unhandled user intent state` -> `tracking unhandled user intent state` (llm.co)
- `track visual choice selection state` -> `track visual choice selection state` (avatars.co)
- `track user utterance state` -> `tracking user talking state` (core.co)
- `track bot utterance state` -> No replacement yet (copy to your bot script)
- `interruption handling bot talking` -> `handling bot talking interruption` (avatars.co)
- `generate then continue interaction` -> `llm continue interaction` (llm.co)

## [2.0-alpha] - 2024-02-28

[Colang 2.0](https://docs.nvidia.com/nemo/guardrails/colang_2/overview.html) represents a complete overhaul of both the language and runtime. Key enhancements include:

### Added

- A more powerful flows engine supporting multiple parallel flows and advanced pattern matching over the stream of events.
- A standard library to simplify bot development.
- Smaller set of core abstractions: flows, events, and actions.
- Explicit entry point through the main flow and explicit activation of flows.
- Asynchronous actions execution.
- Adoption of terminology and syntax akin to Python to reduce the learning curve for new developers.
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,54 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

NOTE:
The changes related to the Colang language and runtime have moved to [CHANGELOG-Colang](./CHANGELOG-Colang.md) file.

## [0.10.0] - Unreleased

### Added

* Colang version [2.0-beta.2](./CHANGELOG-Colang.md#20-beta2---unreleased)
* [#370](https://github.com/NVIDIA/NeMo-Guardrails/pull/370) Add Got It AI's Truthchecking service for RAG applications by @mlmonk.
* [#543](https://github.com/NVIDIA/NeMo-Guardrails/pull/543) Integrating AutoAlign's guardrail library with NeMo Guardrails by @abhijitpal1247.
* [#566](https://github.com/NVIDIA/NeMo-Guardrails/pull/566) Autoalign factcheck examples by @abhijitpal1247.
* [#518](https://github.com/NVIDIA/NeMo-Guardrails/pull/518) Docs: add example config for using models with ollama by @vedantnaik19.
* [#538](https://github.com/NVIDIA/NeMo-Guardrails/pull/538) Support for `--default-config-id` in the server.
* [#539](https://github.com/NVIDIA/NeMo-Guardrails/pull/539) Support for `LLMCallException`.

### Changed

* [#597](https://github.com/NVIDIA/NeMo-Guardrails/pull/597) Make UUID generation predictable in debug-mode.
* [#603](https://github.com/NVIDIA/NeMo-Guardrails/pull/603) Improve chat cli logging.
* [#551](https://github.com/NVIDIA/NeMo-Guardrails/pull/551) Upgrade to Langchain 0.2.x by @nicoloboschi.

### Fixed

* [#482](https://github.com/NVIDIA/NeMo-Guardrails/pull/482) Update README.md by @curefatih.
* [#530](https://github.com/NVIDIA/NeMo-Guardrails/pull/530) Improve the test serialization test to make it more robust.
* [#570](https://github.com/NVIDIA/NeMo-Guardrails/pull/570) Add support for FacialGestureBotAction by @elisam0.
* [#550](https://github.com/NVIDIA/NeMo-Guardrails/pull/550) Fix issue #335 - make import errors visible.
* [#547](https://github.com/NVIDIA/NeMo-Guardrails/pull/547) Fix LLMParams bug and add unit tests (fixes #158).
* [#537](https://github.com/NVIDIA/NeMo-Guardrails/pull/537) Fix directory traversal bug.
* [#536](https://github.com/NVIDIA/NeMo-Guardrails/pull/536) Fix issue #304 NeMo Guardrails packaging.
* [#539](https://github.com/NVIDIA/NeMo-Guardrails/pull/539) Fix bug related to the flow abort logic in Colang 1.0 runtime.

## [0.9.0] - 2024-05-08

### Added

* [Colang 2.0 Documentation](https://docs.nvidia.com/nemo/guardrails/colang_2/overview.html).
* Revamped [NeMo Guardrails Documentation](https://docs.nvidia.com/nemo-guardrails).

### Fixed

* [#461](https://github.com/NVIDIA/NeMo-Guardrails/pull/461) Feature/ccl cleanup.
* [#483](https://github.com/NVIDIA/NeMo-Guardrails/pull/483) Fix dictionary expression evaluation bug.
* [#467](https://github.com/NVIDIA/NeMo-Guardrails/pull/467) Feature/colang doc related cleanups.
* [#484](https://github.com/NVIDIA/NeMo-Guardrails/pull/484) Enable parsing of `..."<NLD>"` expressions.
* [#478](https://github.com/NVIDIA/NeMo-Guardrails/pull/478) Fix #420 - evaluate not working with chat models.


## [0.8.3] - 2024-04-18

### Changed
Expand Down
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ RUN apt-get install -y gcc g++
# Copy and install NeMo Guardrails
WORKDIR /nemoguardrails
COPY . /nemoguardrails
RUN pip install -e .[all]

# Remove the PIP cache
RUN rm -rf /root/.cache/pip
RUN pip install --no-cache-dir -e .[all]

# Make port 8000 available to the world outside this container
EXPOSE 8000
Expand Down
Loading

0 comments on commit 3ee7775

Please sign in to comment.