Skip to content

Commit

Permalink
api timeout added
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyborgscode authored Aug 28, 2024
1 parent fa757e2 commit cde7872
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/PVA.java
Original file line number Diff line number Diff line change
Expand Up @@ -3266,7 +3266,9 @@ public void handleInput(String extText) throws IOException,InterruptedException

HTTP.apihost = ai.get("host");
HTTP.apiport = ai.get("port");

if ( !ai.get("apitimeout").isEmpty() )
HTTP.timeout = Integer.parseInt( ai.get("apitimeout") );

String bimages = "";
String content = "";

Expand Down Expand Up @@ -3345,6 +3347,8 @@ public void handleInput(String extText) throws IOException,InterruptedException

HTTP.apihost = ai.get("host");
HTTP.apiport = ai.get("port");
if ( !ai.get("apitimeout").isEmpty() )
HTTP.timeout = Integer.parseInt( ai.get("apitimeout") );

String[] pics = dos.readFile(getHome()+"/.cache/pva/search.pics.cache").split(config.get("conf","splitter"));

Expand Down Expand Up @@ -3398,7 +3402,9 @@ public void handleInput(String extText) throws IOException,InterruptedException

HTTP.apihost = ai.get("host");
HTTP.apiport = ai.get("port");

if ( !ai.get("apitimeout").isEmpty() )
HTTP.timeout = Integer.parseInt( ai.get("apitimeout") );

aimsgs.addMessage(new AIMessage("user", "User", text ));

// log("messages = "+ aimsgs.toJSON() );
Expand Down

0 comments on commit cde7872

Please sign in to comment.