Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/api/language_model_clients/AzureOpenAI.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ lm = dspy.AzureOpenAI(api_base='...', api_version='2023-12-01-preview', model='g

The constructor initializes the base class `LM` and verifies the provided arguments like the `api_provider`, `api_key`, and `api_base` to set up OpenAI request retrieval through Azure. The `kwargs` attribute is initialized with default values for relevant text generation parameters needed for communicating with the GPT API, such as `temperature`, `max_tokens`, `top_p`, `frequency_penalty`, `presence_penalty`, and `n`.

Azure requires that the deployment id of the Azure deployment to be also provided using the argument `deployment_id`.

```python
class AzureOpenAI(LM):
def __init__(
Expand Down Expand Up @@ -53,4 +55,4 @@ After generation, the completions are post-processed based on the `model_type` p
- `**kwargs`: Additional keyword arguments for completion request.

**Returns:**
- `List[Dict[str, Any]]`: List of completion choices.
- `List[Dict[str, Any]]`: List of completion choices.