mirror of https://github.com/dapr/dapr-agents.git
				
				
				
			
		
			
				
	
	
		
			13 lines
		
	
	
		
			321 B
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			321 B
		
	
	
	
		
			Python
		
	
	
	
from dapr_agents import OpenAIChatClient
 | 
						|
from dotenv import load_dotenv
 | 
						|
 | 
						|
# Load environment variables from .env
 | 
						|
load_dotenv()
 | 
						|
 | 
						|
# Initialize the chat client and call
 | 
						|
llm = OpenAIChatClient()
 | 
						|
response = llm.generate("Name a famous dog!")
 | 
						|
 | 
						|
if len(response.get_content()) > 0:
 | 
						|
    print("Response: ", response.get_content())
 |