Skip to content

Commit

Permalink
Fix breaking changes with autogen
Browse files Browse the repository at this point in the history
  • Loading branch information
heyitsaamir committed Aug 23, 2024
1 parent 6b6310a commit d76cb9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/autogen_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def continue_task(self, context, state: AppTurnState):
llm_config=self.llm_config
)
if is_existing_group_chat and state.conversation.message_history is not None:
await manager.a_resume(messages=state.conversation.message_history)
await manager.a_resume(messages=state.conversation.message_history, remove_termination_string=None) # type: ignore

incoming_message = self.messageBuilder(context, state) if self.messageBuilder is not None else context.activity.text
chat_result = await user_proxy.a_initiate_chat(recipient=manager, message=incoming_message, clear_history=False)
Expand Down
3 changes: 3 additions & 0 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ class Config:

def build_llm_config(self):
if self.OPENAI_KEY:
print("Using OpenAI API")
autogen_llm_config = {"model": "gpt-4o-mini", "api_key": self.OPENAI_KEY}
elif self.AZURE_OPENAI_KEY and self.AZURE_OPENAI_ENDPOINT:
print("Using Azure OpenAI API")
autogen_llm_config = {
"model": "my-gpt-4-deployment",
"api_version": "2024-02-01",
Expand All @@ -38,6 +40,7 @@ def build_llm_config(self):
"base_url": self.AZURE_OPENAI_ENDPOINT,
}
elif self.AZURE_MANAGED_IDENTITY_CLIENT_ID and self.AZURE_LLM_MODEL and self.AZURE_LLM_BASE_URL:
print("Using Azure OpenAI API with managed identity")
import azure.identity
autogen_llm_config = {
"model": self.AZURE_LLM_MODEL,
Expand Down

0 comments on commit d76cb9c

Please sign in to comment.