Comments (4)
This worked, but its strange that this error did not show up while testing normally, which was why I was having a hard time figuring out the exact cause of this issue.
from nemo-guardrails.
@d-shree : can you provide more details?
- How are the guardrails initialized (the
LLMRails
instance)? - I'm assuming you're not using the built-in server
- Can you share the Dockerfile? Because the action is not registered correctly, maybe there's an issue with the path that is used for the config.
from nemo-guardrails.
- The guardrails are initialised as follows -
client = ChatOpenAI(
api_key=OPEN_AI_KEY,
)
config = RailsConfig.from_content(
colang_content=colang_flow,
yaml_content=config_content
)
rails = LLMRails(config=config, llm=client)
- Nope, not using built-in server
- The Dockerfile is pretty straightforward as shown below, the colang flows are being passed via the request payload and actions are configured in a file called actions.py, using the
@action
decorator.
FROM python:3.9
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8009
CMD ["uvicorn", "src.endpoints:app", "--host", "0.0.0.0", "--port", "8076"]`
from nemo-guardrails.
@d-shree: actions are loaded automatically from the actions.py
file when the configuration is loaded from a path. If you're creating the RailsConfig
instance with from_content
, you need to manually register the actions using rails.register_action
. Let me know if this solves the issue with the action not found.
from nemo-guardrails.
Related Issues (20)
- Error evaluating '$generation_options.rails.input': Attribute 'rails' does not exist in expression 'var_generation_options.rails.input' HOT 1
- passing in relevant_chunks as a message's context HOT 1
- Compatibility with LangChain's invoke() HOT 2
- Issue with streaming with Ollama HOT 1
- Internal error occurs whenever I pass a prompt to conversation chain with NeMo
- Issue with Overriding Prompt of SELF_CHECK_FACTS Task HOT 7
- Azure GPT models not working HOT 3
- Guardrails throwing error when input message has \n HOT 1
- Nemo Guardrails on Lambda FileNotFoundError with '.cache/embeddings' HOT 1
- TypeError: cannot pickle '_thread.RLock' object HOT 10
- Issue with Integrating NeMo Guardrails with LangChain and LangServe for RAG Chatbot
- Error while execution generate_user_intent: Connection error. HOT 3
- .co file defination HOT 1
- No Response and No LLM calls were made. History: HOT 3
- output flow does not activate HOT 1
- Not blocking certain topics, and still ask LLM multiple times HOT 4
- How to get exception occurring within Nemoguardrails as output?
- Colang 2.0 dict error HOT 3
- Colang 2.0 python async actions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nemo-guardrails.