-
Notifications
You must be signed in to change notification settings - Fork 1
Description
When I try to run chat.ipynb, I get an error when importing DEA, MLA, IA, BOA, CDA, KIA, ERA, DJE, user_proxy.
It seems like in line 75, inside memory_agent.py: strucutred_output_config['config_list'][0].update(response_format = self.strucutred_output)
The "update" attribute does not seem to exist for strucutred_output_config['config_list][0]
I don't want to try and debug that until I actually understand what that's even doing
AttributeError Traceback (most recent call last)
Cell In[1], line 3
1 from autogen import GroupChat,GroupChatManager
2 # from customegroupchat import customised_groupchat, customised_groupchatmanager
----> 3 from agents import DEA, MLA, IA, BOA, CDA, KIA, ERA, DJE, user_proxy
4 from LLM_config import llm_config
5 from utils import generate_prompt, validate_json_output, StateTracker, validate_phase_transition, remove_thinking_output
File ~/Library/CloudStorage/OneDrive-TheAlanTuringInstitute/DCE Documentation/Splunk Centre for Excellence in DCE/PipelineAgent/agents.py:30
26 Components: Optional[Union[list[Component], Component]] = [Component()]
27 # output: str|None = ""
---> 30 DEA = MemoryAgent(
31 name="DataEngineerAgent",
32 description=generate_prompt("prompts/agents/data-engineer.prompt"),
33 # system_message = '''You are a Data Engineer.
34 # Your role is to build and manage the data pipelines.
35 # You will be tasked with ingesting data from various sources, transforming and cleaning it,
36 # and ensuring it is ready for further processing.
37 # Your expertise in data manipulation and pipeline orchestration is vital to the project's success, as you create efficient data flows.
38 # Instructions:**
39 # - Remember, this is a collaborative design discussion, not a project execution. Refrain from assigning or implementing tasks with deadlines.
40 # - Keep the conversation focused on data engineering choices, technologies, and potential challenges.
41 # - Output your deliverables in full when assigned a task.''',
42 system_message=generate_prompt("prompts/agents/data-engineer.prompt"),
43 structured_output=ComponentsMemory,
44 # memory_update_prompt= "Read the newest response to the chat, and populate the json with factual imformation. JSON: {memory}",
45 # memory_reply_prompt= "With the above instruction and chathistory, together with the following json that may or may not have recorded your proposal and comments, Do what the conversation delegation agent has asked you to. Json summary: {memory}",
46 # llm_config=llm_config.update(response_format = ComponentsMemory),
47 llm_config=llm_config,
48 # model_client = DEA_client,
49 code_execution_config=False,
50 # code_execution_config={"use_docker":"amazon/aws-cli"}, # Turn off code execution, by default it is off.
51 max_consecutive_auto_reply=10,
52 human_input_mode="TERMINATE",
53 default_auto_reply="Data engineer Agent has finished its conversation. ",
54 function_map=None, # No registered functions, by default it is None.
55 )
57 IA = MemoryAgent(
58 name="InfrustructureAgent",
59 description=generate_prompt("prompts/agents/infrastructure.prompt"),
(...)
79 function_map=None, # No registered functions, by default it is None.
80 )
83 MLA = MemoryAgent(
84 name="MachineLearningEngineerAgent",
85 description=generate_prompt("prompts/agents/machine-learning.prompt"),
(...)
105 function_map=None, # No registered functions, by default it is None.
106 )
File ~/Library/CloudStorage/OneDrive-TheAlanTuringInstitute/DCE Documentation/Splunk Centre for Excellence in DCE/PipelineAgent/memory_agent.py:75, in MemoryAgent.init(self, structured_output, memory_update_prompt, memory_reply_prompt, *args, **kwargs)
71 self.replace_reply_func(
72 ConversableAgent.generate_oai_reply, MemoryAgent.generate_oai_reply
73 )
74 strucutred_output_config = self.llm_config.copy()
---> 75 strucutred_output_config['config_list'][0].update(response_format = self.strucutred_output)
77 self.client_memory = OpenAIWrapper(**strucutred_output_config)
File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pydantic/main.py:891, in BaseModel.getattr(self, item)
888 return super().getattribute(item) # Raises AttributeError if appropriate
889 else:
890 # this is the current error
--> 891 raise AttributeError(f'{type(self).name!r} object has no attribute {item!r}')
AttributeError: 'OpenAILLMConfigEntry' object has no attribute 'update'