Skip to content

Unable to Use with Azure: ValidationError for Unexpected Keyword Argument 'proxies' #60

@maisadalbone

Description

@maisadalbone

I encountered an issue when trying to use the library with Azure integration. The application fails with a ValidationError related to an unexpected keyword argument proxies. Below is the full traceback:

ValidationError Traceback (most recent call last)
in <cell line: 2>()
1 app_config = AppConfig(None, config_state=config)
----> 2 run_fuzzer(app_config)

3 frames
/usr/local/lib/python3.10/dist-packages/pydantic/v1/main.py 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 AzureChatOpenAI
root
Client.init() got an unexpected keyword argument 'proxies' (type=type_error)

The configuration object used in this scenario is as follows:

  # Default configuration 
config = {
    'attack_provider': 'azure_open_ai',
    'attack_model': 'gpt-4o',
    'target_provider': 'azure_open_ai',
    'target_model': 'gpt-4o',
    'num_attempts': 3,
    'num_threads': 4,
    'attack_temperature': 0.6,
    'custom_benchmark': None,
    'system_prompt': system_prompt,
    'tests': []
}

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