command
module
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Jun 16, 2023
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
¶
The Terraform Provider for OpenAI is a plugin built using the Terraform Plugin Framework.
Requirements
Usage
NOTE: To use the OpenAI provider, set your OpenAI API key as the OPENAI_APIKEY
environment variable.
terraform {
required_providers {
openai = {
source = "registry.terraform.io/vravind1/openai"
version = "0.1.0". // use the appropriate version
}
}
}
data "openai_completion" "example" {
model = "text-davinci-003"
max_tokens = 16
prompt = "which is the best cloud provider?"
}
output "example_response" {
value = data.openai_completion.example.result
}
output "example_tokens" {
value = data.openai_completion.example.total_tokens
}
output "example_reason" {
value = data.openai_completion.example.finish_reason
}
More details on how to use this provider can be found on the Terraform Registry.
License
MIT License
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
internal
|
|
|
|
Click to show internal directories.
Click to hide internal directories.