Python: cleanup and refactoring of chat clients (#2937)

* refactoring and unifying naming schemes of internal methods of chat clients

* set tool_choice to auto

* fix for mypy

* added note on naming and fix #2951

* fix responses

* fixes in azure ai agents client
This commit is contained in:
Eduard van Valkenburg
2025-12-18 13:02:23 +01:00
committed by GitHub
Unverified
parent a71f768331
commit e5c11d38d6
26 changed files with 1128 additions and 1068 deletions
@@ -248,7 +248,7 @@ class AgentFrameworkExecutor:
# Get thread from conversation parameter (OpenAI standard!)
thread = None
conversation_id = request.get_conversation_id()
conversation_id = request._get_conversation_id()
if conversation_id:
thread = self.conversation_store.get_thread(conversation_id)
if thread:
@@ -324,7 +324,7 @@ class AgentFrameworkExecutor:
entity_id = request.get_entity_id() or "unknown"
# Get or create session conversation for checkpoint storage
conversation_id = request.get_conversation_id()
conversation_id = request._get_conversation_id()
if not conversation_id:
# Create default session if not provided
import time
@@ -324,7 +324,7 @@ class AgentFrameworkRequest(BaseModel):
return self.metadata.get("entity_id")
return None
def get_conversation_id(self) -> str | None:
def _get_conversation_id(self) -> str | None:
"""Extract conversation_id from conversation parameter.
Supports both string and object forms: