package cn.com.poc.thirdparty.resource.demand.ai.function;

import cn.com.poc.thirdparty.resource.demand.ai.function.web_seach.WebSearchFunction;
import cn.com.yict.framemax.core.spring.SingleContextInitializer;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;

import java.io.IOException;
import java.security.GeneralSecurityException;

/**
 * @author alex.yao
 * @date 2025/1/14
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(initializers = SingleContextInitializer.class)
@WebAppConfiguration
public class GoogleSearchFunctionTest {
    @Test
    public void testSearch() throws IOException, GeneralSecurityException {
        WebSearchFunction webSearchFunction = new WebSearchFunction();
        System.out.println(webSearchFunction.doFunction("{\"query\":\"今日广州天气\"}", "1",null ,null ));
    }
}
