update

Function

Stores user questions and answers. It must be called after initialization; otherwise, an exception will be thrown.

Prototype

def update(query, answer)

Parameters

Parameter

Data Type

Required/Optional

Description

query

str

Required

User question. The value is a string within the range of (0, 128 × 1024 × 1024].

answer

str

Required

Answer to a user's question. The value is a string within the range of (0, min(1000000, cache_limit)]. Otherwise, the answer will not be cached. For details, see set_cache_limit.