Documentation ¶
Index ¶
- func GetFilePath(filePath string) (*string, error)
- func GetOpenAIAPIError(err error) *openai.APIError
- func New(version string) func() provider.Provider
- func NewAssistantResource() resource.Resource
- func NewFileDataSource() datasource.DataSource
- func NewFileResource() resource.Resource
- func NewFilesDataSource() datasource.DataSource
- func NewFineTuningJobDataSource() datasource.DataSource
- func NewFineTuningJobResource() resource.Resource
- func NewFineTuningJobsDataSource() datasource.DataSource
- func NewModelDataSource() datasource.DataSource
- func NewModelsDataSource() datasource.DataSource
- func NewProjectDataSource() datasource.DataSource
- func NewProjectResource() resource.Resource
- func NewProjectServiceAccountDataSource() datasource.DataSource
- func NewProjectServiceAccountResource() resource.Resource
- func NewProjectServiceAccountsDataSource() datasource.DataSource
- func NewProjectsDataSource() datasource.DataSource
- func NewVectorStoreResource() resource.Resource
- type AssistantResource
- func (r *AssistantResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *AssistantResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *AssistantResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *AssistantResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *AssistantResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *AssistantResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *AssistantResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type FileDataSource
- type FileResource
- func (r *FileResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *FileResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *FileResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *FileResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *FileResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *FileResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *FileResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type FilesDataSource
- type FilesDataSourceModel
- type FineTuningJobDataSource
- func (d *FineTuningJobDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *FineTuningJobDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *FineTuningJobDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type FineTuningJobResource
- func (r *FineTuningJobResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *FineTuningJobResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *FineTuningJobResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *FineTuningJobResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *FineTuningJobResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *FineTuningJobResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *FineTuningJobResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type FineTuningJobsDataSource
- func (d *FineTuningJobsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *FineTuningJobsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *FineTuningJobsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type FineTuningJobsModel
- type ModelDataSource
- type ModelDataSourceModel
- type ModelPermissionModel
- type ModelsDataSource
- type ModelsDataSourceModel
- type OpenAIAssistantResourceModel
- type OpenAIAssistantResponseFormatModel
- type OpenAIAssistantResponseJsonSchemaModel
- type OpenAIAssistantToolFunctionModel
- type OpenAIAssistantToolModel
- type OpenAIAssistantToolResourceCodeInterpreterModel
- type OpenAIAssistantToolResourceFileSearchModel
- type OpenAIAssistantToolResourceFileSearchVectorStoresModel
- type OpenAIAssistantToolResourcesModel
- type OpenAIDatasource
- type OpenAIExpiresAfterModel
- type OpenAIFileCountsModel
- type OpenAIFileModel
- type OpenAIFineTuneEventModel
- type OpenAIFineTuningJobHyperparamsModel
- type OpenAIFineTuningJobModel
- type OpenAIFineTuningJobResourceModel
- type OpenAIProvider
- func (p *OpenAIProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *OpenAIProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *OpenAIProvider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *OpenAIProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *OpenAIProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type OpenAIProviderModel
- type OpenAIResource
- type OpenAIVectorStoreModel
- type ProjectDataSource
- type ProjectModel
- type ProjectResource
- func (r *ProjectResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *ProjectResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *ProjectResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *ProjectResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *ProjectResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *ProjectResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *ProjectResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type ProjectServiceAccountApiKeyModel
- type ProjectServiceAccountDataSource
- func (d *ProjectServiceAccountDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *ProjectServiceAccountDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *ProjectServiceAccountDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type ProjectServiceAccountModel
- type ProjectServiceAccountResource
- func (r *ProjectServiceAccountResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *ProjectServiceAccountResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *ProjectServiceAccountResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *ProjectServiceAccountResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *ProjectServiceAccountResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *ProjectServiceAccountResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *ProjectServiceAccountResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type ProjectServiceAccountsDataSource
- func (d *ProjectServiceAccountsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *ProjectServiceAccountsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *ProjectServiceAccountsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type ProjectServiceAccountsModel
- type ProjectsDataSource
- func (d *ProjectsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *ProjectsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *ProjectsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type ProjectsModel
- type VectorStoreResource
- func (r *VectorStoreResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *VectorStoreResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *VectorStoreResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *VectorStoreResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *VectorStoreResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *VectorStoreResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *VectorStoreResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFilePath ¶ added in v0.8.0
func GetOpenAIAPIError ¶ added in v0.19.0
func NewAssistantResource ¶ added in v0.26.0
func NewFileDataSource ¶ added in v0.2.0
func NewFileDataSource() datasource.DataSource
func NewFileResource ¶ added in v0.2.0
func NewFilesDataSource ¶ added in v0.2.0
func NewFilesDataSource() datasource.DataSource
func NewFineTuningJobDataSource ¶ added in v0.25.0
func NewFineTuningJobDataSource() datasource.DataSource
func NewFineTuningJobResource ¶ added in v0.25.0
func NewFineTuningJobsDataSource ¶ added in v0.25.0
func NewFineTuningJobsDataSource() datasource.DataSource
func NewModelDataSource ¶
func NewModelDataSource() datasource.DataSource
func NewModelsDataSource ¶
func NewModelsDataSource() datasource.DataSource
func NewProjectDataSource ¶ added in v1.7.0
func NewProjectDataSource() datasource.DataSource
func NewProjectResource ¶ added in v1.7.0
func NewProjectServiceAccountDataSource ¶ added in v1.7.0
func NewProjectServiceAccountDataSource() datasource.DataSource
func NewProjectServiceAccountResource ¶ added in v1.7.0
func NewProjectServiceAccountsDataSource ¶ added in v1.7.0
func NewProjectServiceAccountsDataSource() datasource.DataSource
func NewProjectsDataSource ¶ added in v1.7.0
func NewProjectsDataSource() datasource.DataSource
func NewVectorStoreResource ¶ added in v1.4.0
Types ¶
type AssistantResource ¶ added in v0.26.0
type AssistantResource struct {
*OpenAIResource
}
AssistantResource defines the resource implementation.
func (*AssistantResource) Create ¶ added in v0.26.0
func (r *AssistantResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*AssistantResource) Delete ¶ added in v0.26.0
func (r *AssistantResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*AssistantResource) ImportState ¶ added in v0.26.0
func (r *AssistantResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*AssistantResource) Metadata ¶ added in v0.26.0
func (r *AssistantResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*AssistantResource) Read ¶ added in v0.26.0
func (r *AssistantResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*AssistantResource) Schema ¶ added in v0.26.0
func (r *AssistantResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*AssistantResource) Update ¶ added in v0.26.0
func (r *AssistantResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type FileDataSource ¶ added in v0.2.0
type FileDataSource struct {
*OpenAIDatasource
}
DataSource defines the data source implementation.
func (*FileDataSource) Metadata ¶ added in v0.2.0
func (d *FileDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*FileDataSource) Read ¶ added in v0.2.0
func (d *FileDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*FileDataSource) Schema ¶ added in v0.2.0
func (d *FileDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type FileResource ¶ added in v0.2.0
type FileResource struct {
*OpenAIResource
}
FileResource defines the resource implementation.
func (*FileResource) Create ¶ added in v0.2.0
func (r *FileResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*FileResource) Delete ¶ added in v0.2.0
func (r *FileResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*FileResource) ImportState ¶ added in v0.2.0
func (r *FileResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*FileResource) Metadata ¶ added in v0.2.0
func (r *FileResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*FileResource) Read ¶ added in v0.2.0
func (r *FileResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*FileResource) Schema ¶ added in v0.2.0
func (r *FileResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*FileResource) Update ¶ added in v0.2.0
func (r *FileResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type FilesDataSource ¶ added in v0.2.0
type FilesDataSource struct {
*OpenAIDatasource
}
FilesDataSource defines the data source implementation.
func (*FilesDataSource) Metadata ¶ added in v0.2.0
func (d *FilesDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*FilesDataSource) Read ¶ added in v0.2.0
func (d *FilesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*FilesDataSource) Schema ¶ added in v0.2.0
func (d *FilesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type FilesDataSourceModel ¶ added in v0.2.0
type FilesDataSourceModel struct { Id types.String `tfsdk:"id"` Files []OpenAIFileModel `tfsdk:"files"` }
FilesDataSourceModel describes the data source data model.
type FineTuningJobDataSource ¶ added in v0.25.0
type FineTuningJobDataSource struct {
*OpenAIDatasource
}
FineTuningJobDataSource defines the data source implementation.
func (*FineTuningJobDataSource) Metadata ¶ added in v0.25.0
func (d *FineTuningJobDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*FineTuningJobDataSource) Read ¶ added in v0.25.0
func (d *FineTuningJobDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*FineTuningJobDataSource) Schema ¶ added in v0.25.0
func (d *FineTuningJobDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type FineTuningJobResource ¶ added in v0.25.0
type FineTuningJobResource struct {
*OpenAIResource
}
FineTuningJobResource defines the resource implementation.
func (*FineTuningJobResource) Create ¶ added in v0.25.0
func (r *FineTuningJobResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*FineTuningJobResource) Delete ¶ added in v0.25.0
func (r *FineTuningJobResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*FineTuningJobResource) ImportState ¶ added in v0.25.0
func (r *FineTuningJobResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*FineTuningJobResource) Metadata ¶ added in v0.25.0
func (r *FineTuningJobResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*FineTuningJobResource) Read ¶ added in v0.25.0
func (r *FineTuningJobResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*FineTuningJobResource) Schema ¶ added in v0.25.0
func (r *FineTuningJobResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*FineTuningJobResource) Update ¶ added in v0.25.0
func (r *FineTuningJobResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type FineTuningJobsDataSource ¶ added in v0.25.0
type FineTuningJobsDataSource struct {
*OpenAIDatasource
}
FineTuningJobsDataSource defines the data source implementation.
func (*FineTuningJobsDataSource) Metadata ¶ added in v0.25.0
func (d *FineTuningJobsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*FineTuningJobsDataSource) Read ¶ added in v0.25.0
func (d *FineTuningJobsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*FineTuningJobsDataSource) Schema ¶ added in v0.25.0
func (d *FineTuningJobsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type FineTuningJobsModel ¶ added in v0.25.0
type FineTuningJobsModel struct { Id types.String `tfsdk:"id"` Jobs []OpenAIFineTuningJobModel `tfsdk:"jobs"` }
FineTuningJobsModel describes the data source data model.
type ModelDataSource ¶
type ModelDataSource struct {
*OpenAIDatasource
}
ModelDataSource defines the data source implementation.
func (*ModelDataSource) Metadata ¶
func (d *ModelDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ModelDataSource) Read ¶
func (d *ModelDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ModelDataSource) Schema ¶
func (d *ModelDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type ModelDataSourceModel ¶
type ModelDataSourceModel struct { Id types.String `tfsdk:"id"` Created types.Int64 `tfsdk:"created"` Object types.String `tfsdk:"object"` OwnedBy types.String `tfsdk:"owned_by"` Parent types.String `tfsdk:"parent"` Permissions types.List `tfsdk:"permissions"` Root types.String `tfsdk:"root"` }
ModelDataSourceModel describes the data source data model.
func NewModelDataSourceModel ¶
func NewModelDataSourceModel(model *openai.Model) ModelDataSourceModel
type ModelPermissionModel ¶
type ModelPermissionModel struct { Id types.String `tfsdk:"id"` Created types.Int64 `tfsdk:"created"` Object types.String `tfsdk:"object"` AllowCreateEngine types.Bool `tfsdk:"allow_create_engine"` AllowSampling types.Bool `tfsdk:"allow_sampling"` AllowLogprobs types.Bool `tfsdk:"allow_logprobs"` AllowSearchIndices types.Bool `tfsdk:"allow_search_indices"` AllowView types.Bool `tfsdk:"allow_view"` AllowFineTuning types.Bool `tfsdk:"allow_fine_tuning"` Organization types.String `tfsdk:"organization"` // Group types.String `tfsdk:"group"` IsBlocking types.Bool `tfsdk:"is_blocking"` }
type ModelsDataSource ¶
type ModelsDataSource struct {
*OpenAIDatasource
}
ModelsDataSource defines the data source implementation.
func (*ModelsDataSource) Metadata ¶
func (d *ModelsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ModelsDataSource) Read ¶
func (d *ModelsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ModelsDataSource) Schema ¶
func (d *ModelsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type ModelsDataSourceModel ¶
type ModelsDataSourceModel struct { Id types.String `tfsdk:"id"` Models []ModelDataSourceModel `tfsdk:"models"` }
ModelsDataSourceModel describes the data source data model.
type OpenAIAssistantResourceModel ¶ added in v0.26.0
type OpenAIAssistantResourceModel struct { Id types.String `tfsdk:"id"` Object types.String `tfsdk:"object"` CreatedAt types.Int64 `tfsdk:"created_at"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` Model types.String `tfsdk:"model"` Instructions types.String `tfsdk:"instructions"` Tools types.List `tfsdk:"tools"` ToolResources *OpenAIAssistantToolResourcesModel `tfsdk:"tool_resources"` Metadata types.Map `tfsdk:"metadata"` Temperature types.Float64 `tfsdk:"temperature"` TopP types.Float64 `tfsdk:"top_p"` ResponseFormat *OpenAIAssistantResponseFormatModel `tfsdk:"response_format"` }
func NewOpenAIAssistantResourceModel ¶ added in v0.26.0
func NewOpenAIAssistantResourceModel(ctx context.Context, assistant *openai.Assistant) (OpenAIAssistantResourceModel, diag.Diagnostics)
type OpenAIAssistantResponseFormatModel ¶ added in v1.5.0
type OpenAIAssistantResponseFormatModel struct { Type types.String `tfsdk:"type"` JsonSchema *OpenAIAssistantResponseJsonSchemaModel `tfsdk:"json_schema"` }
type OpenAIAssistantResponseJsonSchemaModel ¶ added in v1.5.0
type OpenAIAssistantToolFunctionModel ¶ added in v0.26.0
type OpenAIAssistantToolModel ¶ added in v0.26.0
type OpenAIAssistantToolModel struct { Type types.String `tfsdk:"type"` Function *OpenAIAssistantToolFunctionModel `tfsdk:"function"` }
type OpenAIAssistantToolResourceCodeInterpreterModel ¶ added in v1.2.0
type OpenAIAssistantToolResourceFileSearchModel ¶ added in v1.2.0
type OpenAIAssistantToolResourceFileSearchVectorStoresModel ¶ added in v1.2.2
type OpenAIAssistantToolResourcesModel ¶ added in v1.2.0
type OpenAIDatasource ¶ added in v0.2.0
type OpenAIDatasource struct {
// contains filtered or unexported fields
}
func (*OpenAIDatasource) Configure ¶ added in v0.2.0
func (d *OpenAIDatasource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
type OpenAIExpiresAfterModel ¶ added in v1.4.0
type OpenAIFileCountsModel ¶ added in v1.4.0
type OpenAIFileModel ¶ added in v0.2.0
type OpenAIFileModel struct { Id types.String `tfsdk:"id"` Bytes types.Int64 `tfsdk:"bytes"` Created types.Int64 `tfsdk:"created"` Filename types.String `tfsdk:"filename"` Filepath types.String `tfsdk:"filepath"` Object types.String `tfsdk:"object"` Purpose types.String `tfsdk:"purpose"` }
OpenAIFileModel describes the OpenAI file model.
func NewOpenAIFileModel ¶ added in v0.2.0
func NewOpenAIFileModel(f *openai.File) OpenAIFileModel
func NewOpenAIFileModelWithPath ¶ added in v0.18.0
func NewOpenAIFileModelWithPath(f *openai.File, path string) OpenAIFileModel
type OpenAIFineTuneEventModel ¶ added in v0.5.0
type OpenAIFineTuningJobHyperparamsModel ¶ added in v0.25.0
type OpenAIFineTuningJobModel ¶ added in v0.25.0
type OpenAIFineTuningJobModel struct { Id types.String `tfsdk:"id"` Object types.String `tfsdk:"object"` CreatedAt types.Int64 `tfsdk:"created_at"` FinishedAt types.Int64 `tfsdk:"finished_at"` Model types.String `tfsdk:"model"` FineTunedModel types.String `tfsdk:"fine_tuned_model"` OrganizationId types.String `tfsdk:"organization_id"` Status types.String `tfsdk:"status"` Hyperparams types.Object `tfsdk:"hyperparams"` TrainingFile types.String `tfsdk:"training_file"` ValidationFile types.String `tfsdk:"validation_file"` ResultFiles types.List `tfsdk:"result_files"` TrainedTokens types.Int64 `tfsdk:"trained_tokens"` }
func NewOpenAIFineTuningJobModel ¶ added in v0.25.0
func NewOpenAIFineTuningJobModel(ft *openai.FineTuningJob) OpenAIFineTuningJobModel
type OpenAIFineTuningJobResourceModel ¶ added in v0.25.0
type OpenAIFineTuningJobResourceModel struct { Id types.String `tfsdk:"id"` Object types.String `tfsdk:"object"` CreatedAt types.Int64 `tfsdk:"created_at"` FinishedAt types.Int64 `tfsdk:"finished_at"` Model types.String `tfsdk:"model"` FineTunedModel types.String `tfsdk:"fine_tuned_model"` OrganizationId types.String `tfsdk:"organization_id"` Status types.String `tfsdk:"status"` Hyperparams types.Object `tfsdk:"hyperparams"` TrainingFile types.String `tfsdk:"training_file"` ValidationFile types.String `tfsdk:"validation_file"` ResultFiles types.List `tfsdk:"result_files"` TrainedTokens types.Int64 `tfsdk:"trained_tokens"` Suffix types.String `tfsdk:"suffix"` Wait types.Bool `tfsdk:"wait"` }
func NewOpenAIFineTuningJobResourceModel ¶ added in v0.25.0
func NewOpenAIFineTuningJobResourceModel(ft *openai.FineTuningJob, wait bool) OpenAIFineTuningJobResourceModel
type OpenAIProvider ¶
type OpenAIProvider struct {
// contains filtered or unexported fields
}
OpenAIProvider defines the provider implementation.
func (*OpenAIProvider) Configure ¶
func (p *OpenAIProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
func (*OpenAIProvider) DataSources ¶
func (p *OpenAIProvider) DataSources(ctx context.Context) []func() datasource.DataSource
func (*OpenAIProvider) Metadata ¶
func (p *OpenAIProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*OpenAIProvider) Resources ¶
func (p *OpenAIProvider) Resources(ctx context.Context) []func() resource.Resource
func (*OpenAIProvider) Schema ¶
func (p *OpenAIProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
type OpenAIProviderModel ¶
type OpenAIProviderModel struct { ApiKey types.String `tfsdk:"api_key"` AdminKey types.String `tfsdk:"admin_key"` OrganizationID types.String `tfsdk:"organization_id"` }
OpenAIProviderModel describes the provider data model.
type OpenAIResource ¶ added in v0.2.0
type OpenAIResource struct {
// contains filtered or unexported fields
}
func (*OpenAIResource) Configure ¶ added in v0.2.0
func (d *OpenAIResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
type OpenAIVectorStoreModel ¶ added in v1.4.0
type OpenAIVectorStoreModel struct { Id types.String `tfsdk:"id"` Object types.String `tfsdk:"object"` CreatedAt types.Int64 `tfsdk:"created_at"` Name types.String `tfsdk:"name"` FileIDs types.List `tfsdk:"file_ids"` UsageBytes types.Int64 `tfsdk:"usage_bytes"` FileCounts types.Object `tfsdk:"file_counts"` Status types.String `tfsdk:"status"` ExpiresAfter *OpenAIExpiresAfterModel `tfsdk:"expires_after"` ExpiresAt types.Int64 `tfsdk:"expires_at"` LastActiveAt types.Int64 `tfsdk:"last_active_at"` Metadata types.Map `tfsdk:"metadata"` }
OpenAIVectorStoreModel describes the OpenAI vector store model.
func NewOpenAIVectoreStoreModel ¶ added in v1.4.0
func NewOpenAIVectoreStoreModel(ctx context.Context, vs *openai.VectorStore, data *OpenAIVectorStoreModel) (OpenAIVectorStoreModel, diag.Diagnostics)
type ProjectDataSource ¶ added in v1.7.0
type ProjectDataSource struct {
*OpenAIDatasource
}
ProjectDataSource defines the data source implementation.
func (*ProjectDataSource) Metadata ¶ added in v1.7.0
func (d *ProjectDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ProjectDataSource) Read ¶ added in v1.7.0
func (d *ProjectDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ProjectDataSource) Schema ¶ added in v1.7.0
func (d *ProjectDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type ProjectModel ¶ added in v1.7.0
type ProjectModel struct { Id types.String `tfsdk:"id"` Object types.String `tfsdk:"object"` Name types.String `tfsdk:"name"` CreatedAt types.Int64 `tfsdk:"created_at"` ArchivedAt types.Int64 `tfsdk:"archived_at"` Status types.String `tfsdk:"status"` }
ProjectModel describes the data source data model.
func NewProjectModel ¶ added in v1.7.0
func NewProjectModel(project *openai.Project) ProjectModel
type ProjectResource ¶ added in v1.7.0
type ProjectResource struct {
*OpenAIResource
}
ProjectResource defines the resource implementation.
func (*ProjectResource) Create ¶ added in v1.7.0
func (r *ProjectResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*ProjectResource) Delete ¶ added in v1.7.0
func (r *ProjectResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*ProjectResource) ImportState ¶ added in v1.7.0
func (r *ProjectResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*ProjectResource) Metadata ¶ added in v1.7.0
func (r *ProjectResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*ProjectResource) Read ¶ added in v1.7.0
func (r *ProjectResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*ProjectResource) Schema ¶ added in v1.7.0
func (r *ProjectResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*ProjectResource) Update ¶ added in v1.7.0
func (r *ProjectResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type ProjectServiceAccountApiKeyModel ¶ added in v1.7.0
type ProjectServiceAccountDataSource ¶ added in v1.7.0
type ProjectServiceAccountDataSource struct {
*OpenAIDatasource
}
ProjectServiceAccountDataSource defines the data source implementation.
func (*ProjectServiceAccountDataSource) Metadata ¶ added in v1.7.0
func (d *ProjectServiceAccountDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ProjectServiceAccountDataSource) Read ¶ added in v1.7.0
func (d *ProjectServiceAccountDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ProjectServiceAccountDataSource) Schema ¶ added in v1.7.0
func (d *ProjectServiceAccountDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type ProjectServiceAccountModel ¶ added in v1.7.0
type ProjectServiceAccountModel struct { Id types.String `tfsdk:"id"` ProjectId types.String `tfsdk:"project_id"` Object types.String `tfsdk:"object"` Name types.String `tfsdk:"name"` Role types.String `tfsdk:"role"` CreatedAt types.Int64 `tfsdk:"created_at"` ApiKey types.Object `tfsdk:"api_key"` }
ProjectServiceAccountModel describes the data source data model.
func NewProjectServiceAccountModel ¶ added in v1.7.0
func NewProjectServiceAccountModel(ctx context.Context, projectServiceAccount *openai.ProjectServiceAccount) (ProjectServiceAccountModel, diag.Diagnostics)
func NewProjectServiceAccountResourceModel ¶ added in v1.7.0
func NewProjectServiceAccountResourceModel(projectServiceAccount *openai.ProjectServiceAccount) ProjectServiceAccountModel
type ProjectServiceAccountResource ¶ added in v1.7.0
type ProjectServiceAccountResource struct {
*OpenAIResource
}
ProjectServiceAccountResource defines the resource implementation.
func (*ProjectServiceAccountResource) Create ¶ added in v1.7.0
func (r *ProjectServiceAccountResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*ProjectServiceAccountResource) Delete ¶ added in v1.7.0
func (r *ProjectServiceAccountResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*ProjectServiceAccountResource) ImportState ¶ added in v1.7.0
func (r *ProjectServiceAccountResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*ProjectServiceAccountResource) Metadata ¶ added in v1.7.0
func (r *ProjectServiceAccountResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*ProjectServiceAccountResource) Read ¶ added in v1.7.0
func (r *ProjectServiceAccountResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*ProjectServiceAccountResource) Schema ¶ added in v1.7.0
func (r *ProjectServiceAccountResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*ProjectServiceAccountResource) Update ¶ added in v1.7.0
func (r *ProjectServiceAccountResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type ProjectServiceAccountsDataSource ¶ added in v1.7.0
type ProjectServiceAccountsDataSource struct {
*OpenAIDatasource
}
ProjectServiceAccountsDataSource defines the data source implementation.
func (*ProjectServiceAccountsDataSource) Metadata ¶ added in v1.7.0
func (d *ProjectServiceAccountsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ProjectServiceAccountsDataSource) Read ¶ added in v1.7.0
func (d *ProjectServiceAccountsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ProjectServiceAccountsDataSource) Schema ¶ added in v1.7.0
func (d *ProjectServiceAccountsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type ProjectServiceAccountsModel ¶ added in v1.7.0
type ProjectServiceAccountsModel struct { Id types.String `tfsdk:"id"` ProjectId types.String `tfsdk:"project_id"` ProjectServiceAccounts []ProjectServiceAccountModel `tfsdk:"project_service_accounts"` }
ProjectServiceAccountsModel describes the data source data model.
type ProjectsDataSource ¶ added in v1.7.0
type ProjectsDataSource struct {
*OpenAIDatasource
}
ProjectsDataSource defines the data source implementation.
func (*ProjectsDataSource) Metadata ¶ added in v1.7.0
func (d *ProjectsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ProjectsDataSource) Read ¶ added in v1.7.0
func (d *ProjectsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ProjectsDataSource) Schema ¶ added in v1.7.0
func (d *ProjectsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type ProjectsModel ¶ added in v1.7.0
type ProjectsModel struct { Id types.String `tfsdk:"id"` Projects []ProjectModel `tfsdk:"projects"` }
ProjectsModel describes the data source data model.
type VectorStoreResource ¶ added in v1.4.0
type VectorStoreResource struct {
*OpenAIResource
}
VectorStoreResource defines the resource implementation.
func (*VectorStoreResource) Create ¶ added in v1.4.0
func (r *VectorStoreResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*VectorStoreResource) Delete ¶ added in v1.4.0
func (r *VectorStoreResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*VectorStoreResource) ImportState ¶ added in v1.4.0
func (r *VectorStoreResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*VectorStoreResource) Metadata ¶ added in v1.4.0
func (r *VectorStoreResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*VectorStoreResource) Read ¶ added in v1.4.0
func (r *VectorStoreResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*VectorStoreResource) Schema ¶ added in v1.4.0
func (r *VectorStoreResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*VectorStoreResource) Update ¶ added in v1.4.0
func (r *VectorStoreResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Source Files ¶
- assistant_resource.go
- common.go
- file_data_source.go
- file_resource.go
- files_data_source.go
- finetuning_job_data_source.go
- finetuning_job_resource.go
- finetuning_jobs_data_source.go
- model_data_source.go
- models.go
- models_data_source.go
- project_data_source.go
- project_resource.go
- project_service_account_data_source.go
- project_service_account_resource.go
- project_service_accounts_data_source.go
- projects_data_source.go
- provider.go
- vector_store_resource.go