Skip to main content

2 docs tagged with "chat"

View all tags

Conversational AI

This document outlines how to create and manage conversational sessions using the google.genai library in Python. It covers initializing chat sessions, sending messages, overriding parameters for single requests, and importantly, how to permanently update parameters like temperature and maxoutputtokens while preserving system_instruction and existing history.

OpenAI Chat Completion

The most common use case for the OpenAI API in Python is generating chat completions. This involves sending a list of messages to a specified model and receiving a generated response. The API supports both synchronous (blocking) and asynchronous (non-blocking) calls, and responses can be received as a single object or streamed as chunks.