All Classes and Interfaces

Class
Description
 
 
 
 
Used in async mode
 
 
a conversation message
 
 
 
 
 
 
an implementation of PuppyChatter that uses the google gemini aqa api
must be used with GeminiAqaPromptParameters and requires a fact source

usage:
PuppyChatter chatter
= new GeminiAqaPuppyChatter("{google api key}",
null
);
String sessionId=chatter.createSession();
InlinePassages inlinePassages=new InlinePassages();
inlinePassages.setPassages(List.of(
"只見在影片中網紅酷的夢不解台灣影片在國外為何比較不紅,對此,魏德聖認為影視是最容易打文化認同的,但台灣在經濟起飛的時候選擇了科技,相比之下南韓就選擇娛樂,所以會透過電視、電影的方式來達到韓式文化的行銷,魏德聖也認為對民眾來說電影就是生活跟自己比較有關係,但是台灣選擇了台積電就跟我們比較沒關係「這是我最無力感的地方。」",
"影片一曝光也引起許多網友的討論,但有許多網友表示不認同魏德聖導演的想法,網友提到韓國也是從科技業代工起來,甚至有網友認為魏德聖是在牽拖「他直接說沒受重視就好了,不用扯台積」,也有其餘網友提出電影不紅的看法「台灣電影的問題大部分是在沒辦法讓跨語種的觀眾也產生投射,也就是主題太狹窄」、「好看我會看啊~ 但國片就那樣」、「要讓台灣的電影在國外受歡迎,拜託先拍出有水準好片。」",
"2+2=4"));
GeminiAqaPromptParameters parameters=new GeminiAqaPromptParameters("user", inlinePassages);
Response response=chatter.bark(sessionId, "台灣電影在國外爲什麼不紅", parameters);
System.out.println("message="+response.getMessage());
chatter.closeSession(sessionId);
 
a fact source that connects to google drive to use this class, first, add codenote@api-project-437674419610.iam.gserviceaccount.com as a viewer to the target google drive folder and then pass the id of the folder as a parameter to the constructor
 
a special type of inlinepassages that use a google search to obtain passages a baseQuery can be specified as as the initial query the implementation will use the last conversation to construct additional query terms
 
 
 
 
 
 
an implementation of PuppyChatter based on Open Router usage:
PuppyChatter<PromptParameters, Response> chatter=new OpenrouterPuppyChatter("open router key");
String session=chatter.createSession();
Response response=chatter.bark(session, "你好", new PromptParameters("user"));
System.out.println(response.getMessage());
chatter.closeSession(session);
when issuing prompt, a leading model:xxx can be used to specify the model to use
 
Parameters for configuring a prompt
 
the response of a prompt
verify a reponse, return whether it is good, ask again, or give up
 
 
 
 
the first level is a partial key i.e.
whether a response is good, have to try a gain, or give up and failed