Python: Standardize docstrings: Use Keyword Args for Settings classes and add environment variable examples (#1202)

* Initial plan

* Update Settings classes to use Keyword Args and add examples

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>

* Add examples and env var documentation to chat clients

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>

* Add env var docs and examples to Responses and AzureAI clients

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>

* Remove Args from class docstrings where they belong in __init__

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>

* Add env var docs and examples to Assistants clients

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>

* updated to keyword args

* Fix incorrect code block formatting in _workflows/_executor.py

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>

* Fix markdown code blocks in _workflows/_edge.py - use Sphinx format

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>

* Update _assistants_client.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
Co-authored-by: eavanvalkenburg <github@vanvalkenburg.eu>
Co-authored-by: Eduard van Valkenburg <eavanvalkenburg@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot
2025-10-06 07:37:34 +00:00
committed by GitHub
Unverified
parent 0cd794abe7
commit 8bd3e11d3e
17 changed files with 711 additions and 477 deletions
@@ -31,18 +31,33 @@ class CopilotStudioSettings(AFBaseSettings):
with the encoding 'utf-8'. If the settings are not found in the .env file, the settings
are ignored; however, validation will fail alerting that the settings are missing.
Attributes:
environmentid: Environment ID of environment with the Copilot Studio App..
(Env var COPILOTSTUDIOAGENT__ENVIRONMENTID)
Keyword Args:
environmentid: Environment ID of environment with the Copilot Studio App.
Can be set via environment variable COPILOTSTUDIOAGENT__ENVIRONMENTID.
schemaname: The agent identifier or schema name of the Copilot to use.
(Env var COPILOTSTUDIOAGENT__SCHEMANAME)
Can be set via environment variable COPILOTSTUDIOAGENT__SCHEMANAME.
agentappid: The app ID of the App Registration used to login.
(Env var COPILOTSTUDIOAGENT__AGENTAPPID)
Can be set via environment variable COPILOTSTUDIOAGENT__AGENTAPPID.
tenantid: The tenant ID of the App Registration used to login.
(Env var COPILOTSTUDIOAGENT__TENANTID)
Parameters:
Can be set via environment variable COPILOTSTUDIOAGENT__TENANTID.
env_file_path: If provided, the .env settings are read from this file path location.
env_file_encoding: The encoding of the .env file, defaults to 'utf-8'.
Examples:
.. code-block:: python
from agent_framework_copilotstudio import CopilotStudioSettings
# Using environment variables
# Set COPILOTSTUDIOAGENT__ENVIRONMENTID=env-123
# Set COPILOTSTUDIOAGENT__SCHEMANAME=my-agent
settings = CopilotStudioSettings()
# Or passing parameters directly
settings = CopilotStudioSettings(environmentid="env-123", schemaname="my-agent")
# Or loading from a .env file
settings = CopilotStudioSettings(env_file_path="path/to/.env")
"""
env_prefix: ClassVar[str] = "COPILOTSTUDIOAGENT__"