Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.
This repository was archived by the owner on May 16, 2025. It is now read-only.

ValidationError: 1 validation error for DetectApiSuccessResponse modelScore Input should be a valid number [type=float_type, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.4/v/float_type #68

Description

@Tizzzzy

ValidationError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_10500\1771080007.py in
14 new_prompt = prompt.replace("[INSERT PROMPT HERE]", question)
15 print(new_prompt)
---> 16 if rebuff(new_prompt): #如果没成功
17 # Write new_prompt and respond into the fail CSV
18 fail_writer.writerow([new_prompt])

~\AppData\Local\Temp\ipykernel_10500\4207727278.py in rebuff(prompt)
9
10 user_input = prompt
---> 11 result = rb.detect_injection(user_input)
12
13 if result.injectionDetected:

c:\Users\ds1657\Anaconda3\lib\site-packages\rebuff\rebuff.py in detect_injection(self, user_input, max_heuristic_score, max_vector_score, max_model_score, check_heuristic, check_vector, check_llm)
90
91 response_json = response.json()
---> 92 success_response = DetectApiSuccessResponse.parse_obj(response_json)
93
94 if (

c:\Users\ds1657\Anaconda3\lib\site-packages\typing_extensions.py in wrapper(*args, **kwargs)
2358 def wrapper(*args, **kwargs):
...

ValidationError: 1 validation error for DetectApiSuccessResponse
modelScore
Input should be a valid number [type=float_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.4/v/float_type

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions