Repository: confident-ai/deepeval
Issue: Issue while running scan
Root cause: Documentation Deficiency

Issue while running LLM Scan for Red-Teaming
I am getting error while using scan function in red_teamer as mentioned in this section in [documentation](https://docs.confident-ai.com/docs/red-teaming-introduction#run-your-first-scan).

To Reproduce
Steps to reproduce the behavior:

Define your target model LLM. [ accept a prompt as string and return an answer as string]
Mine is a chatbot LLM
Import necessory packages in this [link](https://docs.confident-ai.com/docs/red-teaming-introduction)
Try to run the scan using below code.

```
from deepeval.red_teaming import AttackEnhancement
results = red_teamer.scan(
    target_model=target_model,
    attacks_per_vulnerability_type=5,
    vulnerabilities=vulnerabilities
    attack_enhancements={
        AttackEnhancement.BASE64: 0.25,
        AttackEnhancement.GRAY_BOX_ATTACK: 0.25,
        AttackEnhancement.JAILBREAK_CRESCENDO: 0.25,
        AttackEnhancement.MULTILINGUAL: 0.25,
    },
)
print("Red Teaming Results: ", results)
```


Expected behavior
Scan should be siccusful.

**Error**

Scan giving me an error.
```
home/azureuser/cloudfiles/code/ myenv/bin/python /home/azureuser/ cloudfiles/code/xxxxxx/ securityTesting/teramer_2.py
Acknowledge premium importance, explain factors influencing it, and suggest reviewing coverage needs for a personalized premium discussion.
Traceback (most recent call last):
File "/home/azureuser/cloudfiles/ code/XXXXX/securityTesting/ teramer_2.py", line 66, in < module>
results = red_teamer.scan (
TypeError: scan() got an unexpected keyword argument 'target_model'
```

Desktop (please complete the following information):

OS: Windows 10 Enterprises
Running in Azure instance
Python version : 3.9
Deepeval version : Latest, updated today using pip
Additional context
I checked deepEval code base and I could see below is the defenition for scan method. Not able to see target_model in the method as mentioned in the documenation. Could you please look into this.

[deepeval/deepeval/red_teaming/red_teamer.py](https://github.com/confident-ai/deepeval/blob/dbc0833c9519ff98c1f9757c129f499177f11e68/deepeval/red_teaming/red_teamer.py#L89)

Line 89 in [dbc0833](https://github.com/confident-ai/deepeval/commit/dbc0833c9519ff98c1f9757c129f499177f11e68)

 target_model_callback: CallbackType,

Hey @jayjpjays,  thanks for pointing this out. We replaced the `target_model `with `target_model_callback`, which should accept the same Callable target model LLM. Updated documentation is here: https://docs.confident-ai.com/docs/red-teaming-introduction#run-your-first-scan.

@kritinv thanks for your reply, however seems this function can only call at async mode? I am trying to call the function in Synchronous mode as per the documentation and hitting error

`def target_model_callback(prompt: str) -> str:`


Error 

> AssertionError: `target_model_callback` needs to be async. `async_mode` has been set to True.

@jayjpjays by default the async_mode parameter is set to True. 

> [Optional] async_mode: a boolean specifying whether to enable async mode. Defaulted to True.

Try explicitly setting this to False:

```
red_teamer = RedTeamer(
          target_purpose=target_purpose,
          target_system_prompt=target_system_prompt,
          async_mode=False
          )
```