Skip to content

Commit

Permalink
Add default_header
Browse files Browse the repository at this point in the history
  • Loading branch information
nour-bouzid committed Jan 29, 2025
1 parent 6044924 commit 8188c25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class BaseOpenAIClientConfigurationConfigModel(CreateArgumentsConfigModel):
max_retries: int | None = None
model_capabilities: ModelCapabilities | None = None # type: ignore
model_info: ModelInfo | None = None

default_header: Dict[str, str] | None = None

# See OpenAI docs for explanation of these parameters
class OpenAIClientConfigurationConfigModel(BaseOpenAIClientConfigurationConfigModel):
Expand Down
10 changes: 10 additions & 0 deletions python/packages/autogen-ext/src/autogen_ext/models/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from src.autogen_ext.models.openai import AzureOpenAIChatCompletionClient

model_client = AzureOpenAIChatCompletionClient(
model="gpt-4o-2024-05-13",
azure_deployment="xxxxxx",
azure_endpoint="xxxxxx",
api_version="xxxx",
api_key=os.getenv("AZURE_API_KEY"),
default_headers={"X-User-Id": os.getlogin()},
)

0 comments on commit 8188c25

Please sign in to comment.