File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1515class CBlock :
1616 """A `CBlock` is a block of content that can serve as input to or output from an LLM."""
1717
18- def __init__ (self , value : str | None , meta : dict [str , Any ] | None = None ):
19- """Initializes the CBlock with a string and some metadata."""
18+ def __init__ (
19+ self ,
20+ value : str | None ,
21+ meta : dict [str , Any ] | None = None ,
22+ * ,
23+ cache : bool = False ,
24+ ):
25+ """Initializes the CBlock with a string and some metadata.
26+
27+ Args:
28+ value: the underlying value stored in this CBlock
29+ meta: Any meta-information about this CBlock (e.g., the inference engine's Completion object).
30+ cache: If set to `True` then this CBlock's KV cache might be stored by the inference engine. Experimental."""
2031 if value is not None and not isinstance (value , str ):
2132 raise TypeError ("value to a Cblock should always be a string or None" )
2233 self ._underlying_value = value
34+ self .cache = cache
2335 if meta is None :
2436 meta = {}
2537 self ._meta = meta
You can’t perform that action at this time.
0 commit comments