公開類別 LlmInference
LlmInference Task Java API
巢狀類別
類別 | LlmInference.LlmInferenceOptions | 設定 LlmInference 的選項。 |
公用方法
void |
close()
關閉並清理
LlmInference 。 |
Static LlmInference | |
字串 | |
void | |
int |
繼承的方法
公用方法
public static LlmInference createFromOptions (內容背景資訊、LlmInference.LlmInferenceOptions 選項)
建立 LlmInference 工作。
參數
context | |
---|---|
選項 |
public void generateResponseAsync (String inputText)
public int sizeInTokens (String text)
「只」執行 LLM 的權杖化作業,然後傳回結果的大小 (在符記中)。無法在 generateResponse(String)
查詢執行期間呼叫。generateResponse
參數
text | 要權杖化的文字。 |
---|
傳回
- 文字產生的權杖化結果中的符記數量。
擲回
。 |