Open
Description
Describe the bug
I've run the code in https://github.com/protectai/llm-guard/blob/main/examples/google_gemini.py in Google Colab
To Reproduce
Steps to reproduce the behavior:
- Create a python notebook with two pieces of code:
- first from here:
!pip install google-cloud-aiplatform --upgrade --user
!pip install llm-guard
- second from here: Go to https://github.com/protectai/llm-guard/blob/main/examples/google_gemini.py
- Put reasonable Project/region
- Execute first, reload env, execute second.
- See error
Expected behavior
Something good should happen - you tell me :)
Screenshots
If applicable, add screenshots to help explain your problem.
Coming in next comment
Additional context
See below
first error
First it said It was compiled with different version of numpy, so I've added this as suggested by Gemini:
!pip install --upgrade numpy
second error
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-d5c52cca659e> in <cell line: 30>()
28
29 # Import Scanners from LLM Guard
---> 30 from llm_guard import scan_output, scan_prompt
31 from llm_guard.input_scanners import PromptInjection, TokenLimit, Toxicity
32 from llm_guard.output_scanners import NoRefusal, Relevance, Sensitive
14 frames
/usr/local/lib/python3.10/dist-packages/thinc/backends/numpy_ops.pyx in init thinc.backends.numpy_ops()
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Metadata
Metadata
Assignees
Labels
No labels