| 
					
				 | 
			
			
				@@ -0,0 +1,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+from tavily import TavilyClient 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+def tavily_ai(prompt): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    tavily = TavilyClient(api_key="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") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    # For advanced search: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    response = tavily.search( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        query="{}, 通过这个标题生成一遍文章".format(prompt), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        search_depth="advanced", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        include_images=True, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        include_answer=True, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        include_raw_content=True 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return response 
			 |