mirror of
				https://github.com/microsoft/autogen.git
				synced 2025-10-31 01:40:58 +00:00 
			
		
		
		
	 a911d1c2ec
			
		
	
	
		a911d1c2ec
		
			
		
	
	
	
	
		
			
			* set use_docker to default to true * black formatting * centralize checking and add env variable option * set docker env flag for contrib tests * set docker env flag for contrib tests * better error message and cleanup * disable explicit docker tests * docker is installed so can't check for that in test * pr comments and fix test * rename and fix function descriptions * documentation * update notebooks so that they can be run with change in default * add unit tests for new code * cache and restore env var * skip on windows because docker is running in the CI but there are problems connecting the volume * update documentation * move header * update contrib tests
		
			
				
	
	
		
			12 lines
		
	
	
		
			666 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			666 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
 | |
| 
 | |
| # Load LLM inference endpoints from an env variable or a file
 | |
| # See https://microsoft.github.io/autogen/docs/FAQ#set-your-api-endpoints
 | |
| # and OAI_CONFIG_LIST_sample
 | |
| config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
 | |
| assistant = AssistantAgent("assistant", llm_config={"config_list": config_list})
 | |
| user_proxy = UserProxyAgent(
 | |
|     "user_proxy", code_execution_config={"work_dir": "coding", "use_docker": False}
 | |
| )  # IMPORTANT: set to True to run code in docker, recommended
 | |
| user_proxy.initiate_chat(assistant, message="Plot a chart of NVDA and TESLA stock price change YTD.")
 |