We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I run it in colab,
config.yml:
models: - type: main engine: huggingface_hub model: baichuan-inc/Baichuan2-7B-Chat rails: input: flows: - self check input output: flows: - self check output
jupyter code:
import os from google.colab import userdata os.environ["HUGGINGFACEHUB_API_TOKEN"] = userdata.get('HUGGINGFACEHUB_API_TOKEN') print(os.environ["HUGGINGFACEHUB_API_TOKEN"]) from nemoguardrails import RailsConfig, LLMRails config = RailsConfig.from_path("./config") rails = LLMRails(config)
return Error:
ValidationError Traceback (most recent call last) [<ipython-input-16-285c50de0d73>](https://localhost:8080/#) in <cell line: 4>() 2 3 config = RailsConfig.from_path("./config") ----> 4 rails = LLMRails(config) 3 frames [/usr/local/lib/python3.10/dist-packages/pydantic/v1/main.py](https://localhost:8080/#) in __init__(__pydantic_self__, **data) 339 values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data) 340 if validation_error: --> 341 raise validation_error 342 try: 343 object_setattr(__pydantic_self__, '__dict__', values) ValidationError: 1 validation error for HuggingFaceHub __root__ Must specify either `repo_id` or `task`, or both. (type=value_error)`
how can I use it in "baichuan-inc/Baichuan2-7B-Chat"
The text was updated successfully, but these errors were encountered:
Just based on the error, I guess you have to do something like:
models: - type: main engine: huggingface_hub model: baichuan-inc/Baichuan2-7B-Chat parameters: task: "..." repo_id: "..."
Let me know if this works.
Sorry, something went wrong.
drazvan
No branches or pull requests
I run it in colab,
config.yml:
jupyter code:
return Error:
how can I use it in "baichuan-inc/Baichuan2-7B-Chat"
The text was updated successfully, but these errors were encountered: