command
module
Version:
v0.0.0-...-bc181f1
Opens a new window with list of versions in this module.
Published: Aug 29, 2025
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
OpenAI STRUCTURED JSON Example
This example demonstrates how to use the OpenAI model with the LangChain Go library to generate structured JSON output.
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.
-
Prompts the AI to generate a structured JSON output.
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_jsonformat.go
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.