@ -102,8 +102,8 @@ Now that we have covered the class definition, let's delve into the functionalit
One of the primary use cases of `ModelParallelizer` is to distribute a task to all registered LLMs and collect their responses. This can be achieved using the `run(task)` method. Below is an example:
One of the primary use cases of `ModelParallelizer` is to distribute a task to all registered LLMs and collect their responses. This can be achieved using the `run(task)` method. Below is an example:
```python
```python
god_mode = ModelParallelizer(llms)
parallelizer = ModelParallelizer(llms)
responses = god_mode.run("Translate the following English text to French: 'Hello, how are you?'")
responses = parallelizer.run("Translate the following English text to French: 'Hello, how are you?'")
```
```
### Printing Responses
### Printing Responses
@ -111,7 +111,7 @@ responses = god_mode.run("Translate the following English text to French: 'Hello
To present the responses from all LLMs in a structured tabular format, use the `print_responses(task)` method. Example:
To present the responses from all LLMs in a structured tabular format, use the `print_responses(task)` method. Example:
```python
```python
god_mode.print_responses("Summarize the main points of 'War and Peace.'")
parallelizer.print_responses("Summarize the main points of 'War and Peace.'")
```
```
### Saving Responses to a File
### Saving Responses to a File
@ -119,7 +119,7 @@ god_mode.print_responses("Summarize the main points of 'War and Peace.'")
Users can save the responses to a file using the `save_responses_to_file(filename)` method. This is useful for archiving and reviewing responses later. Example:
Users can save the responses to a file using the `save_responses_to_file(filename)` method. This is useful for archiving and reviewing responses later. Example: