Interface AiSearch

All Superinterfaces:
org.teavm.jso.JSObject

public interface AiSearch extends org.teavm.jso.JSObject
An AI Search binding. Declared with aiSearch(), named AI_SEARCH by default.

Retrieval over an indexed corpus, optionally with a generated answer over the top.

Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default TSObject
    ask(String query)
    Retrieves passages and generates an answer from them.
    org.teavm.jso.core.JSPromise<TSObject>
    runAi(TSObject options)
     
    org.teavm.jso.core.JSPromise<TSObject>
     
    default TSObject
    search(String query)
    Retrieves matching passages without generating an answer.

    Methods inherited from interface org.teavm.jso.JSObject

    cast
  • Method Details

    • search

      default TSObject search(String query)
      Retrieves matching passages without generating an answer.
      Parameters:
      query - the query
      Returns:
      the matches
    • ask

      default TSObject ask(String query)
      Retrieves passages and generates an answer from them.
      Parameters:
      query - the query
      Returns:
      the answer and the passages behind it
    • runSearch

      org.teavm.jso.core.JSPromise<TSObject> runSearch(TSObject options)
    • runAi

      org.teavm.jso.core.JSPromise<TSObject> runAi(TSObject options)