View Source LangChain.ForOpenAIApi protocol (LangChain v0.1.0)

A protocol that defines a way for converting the LangChain Elixir data structs to an OpenAI supported data structure and format for making an API call.

Summary

Types

t()

All the types that implement this protocol.

Functions

Protocol callback function for converting different structs into a form that can be passed to the OpenAI API.

Types

@type t() :: term()

All the types that implement this protocol.

Functions

@spec for_api(struct()) :: nil | %{required(String.t()) => any()}

Protocol callback function for converting different structs into a form that can be passed to the OpenAI API.