Expand description

This module implements chains for the ChatGPT model from OpenAI.

Structs

  • The ChatPromptTemplate struct represents a conversational template for generating prompts with LLMs. It consists of a list of messages that form the structure of the conversation.
  • The executor for the ChatGPT model. This executor uses the async_openai crate to communicate with the OpenAI API.
  • A message prompt template consists of a role and a content. The role is either User, System, Assistant, and the content is a prompt template.
  • The Step struct represents an individual step within a chain for ChatGPT models. It is responsible for configuring the input parameters for the model and providing the prompt.

Enums

  • The Model enum represents the available ChatGPT models that you can use through the OpenAI API. These models have different capabilities and performance characteristics, allowing you to choose the one that best suits your needs.