Returns

Returns a list of InferenceResult objects.

Example

conversation = [
    {'role': 'user', 'content': 'Hi'},
    {'role': 'assistant', 'content': 'Hello!'},
    {'role': 'user', 'content': 'How are you?'},
    {'role': 'assistant', 'content': 'I am a bot, I have no feelings.'}
]
inference_results = galtea.inference_results.create_batch(
    session_id="YOUR_SESSION_ID",
    conversation_turns=conversation
)

Parameters

session_id
string
required

The session ID to log the inference results to.

conversation_turns
list[dict]
required

A list of dictionaries, where each dictionary represents a conversation turn with role and content keys as mandatory and an optional retrieval_context key. The role key can only have these values: user or assistant.

The retrieval_context key is optional and can be sent to our platform if you have used it when calling your AI product. For this reason, it only makes sense to send it when we have a message with role assistant.