Produce a context object from the session. The caller provides an optional token limit which the entire context must fit into. If not provided, the context will be exhaustive (within configured max tokens). To do this, we allocate 40% of the token limit to the summary, and 60% to recent messages — as many as can fit. Note that the summary will usually take up less space than this. If the caller does not want a summary, we allocate all the tokens to recent messages.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of the workspace
ID of the session
Number of tokens to use for the context. Includes summary if set to true. Includes representation and peer card if they are included in the response. If not provided, the context will be exhaustive (within 100000 tokens)
x <= 100000The most recent message, used to fetch semantically relevant observations
Whether or not to include a summary if one is available for the session
The target of the perspective. If given without peer_perspective, will get the Honcho-level representation and peer card for this peer. If given with peer_perspective, will get the representation and card for this peer from the perspective of that peer.
A peer to get context for. If given, response will attempt to include representation and card from the perspective of that peer. Must be provided with peer_target.
Only used if last_message is provided. Whether to limit the representation to the session (as opposed to everything known about the target peer)
Only used if last_message is provided. The number of semantic-search-retrieved observations to include in the representation
1 <= x <= 100Only used if last_message is provided. The maximum distance to search for semantically relevant observations
0 <= x <= 1Only used if last_message is provided. Whether to include the most derived observations in the representation
Only used if last_message is provided. The maximum number of observations to include in the representation
1 <= x <= 100Successful Response
The summary if available
The peer representation, if context is requested from a specific perspective
The peer card, if context is requested from a specific perspective