command
module
Version:
v0.0.0-...-c2f9ad7
Opens a new window with list of versions in this module.
Published: Jun 28, 2025
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
OpenAI Multi-Content Example
This example demonstrates how to use the OpenAI model with the LangChain Go library to post multiple messages.
What does this example do?
This nifty little program does the following:
-
Sets up a connection to the OpenAI API using the GPT-4o model.
-
Posts multiple messages to the AI, each with a different role (user, assistant, system).
-
Prints the AI's response for each message.
How to Run
- Make sure you have Go installed on your system.
- Set up your OpenAI API key as an environment variable.
- Run the program:
go run openai-gpt4o-mutil-content.go
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.