Documentation
¶
Index ¶
- func AccountCredentialsFromMap(m map[string]any) (model.IntegrationCredentials, error)
- func AdjustResource(job describe.DescribeJob, resource *model.Resource) error
- func DescribeListByOpenAI(...) model.ResourceDescriber
- func DescribeSingleByOpenAI(...) model.SingleResourceDescriber
- func GetAdditionalParameters(job describe.DescribeJob) (map[string]string, error)
- func GetResourceMetadata(job describe.DescribeJob, resource model.Resource) (map[string]string, error)
- func WithTriggerType(ctx context.Context, tt enums.DescribeTriggerType) context.Context
- type AssistantDescription
- type AssistantObjectToolResources
- type AssistantObjectToolResourcesCodeInterpreter
- type AssistantObjectToolResourcesFileSearch
- type AssistantObjectToolsInner
- type AssistantResponse
- type AssistantToolsCode
- type AssistantToolsFileSearch
- type AssistantToolsFileSearchFileSearch
- type AssistantToolsFunction
- type FileDescription
- type FileResponse
- type FileSearchRankingOptions
- type FunctionObject
- type Metadata
- type ModelsDescription
- type ModelsResponse
- type NullableBool
- type NullableInt32
- type OpenAIAPIHandler
- type Permission
- type ProjectApiKey
- type ProjectApiKeyDescription
- type ProjectApiKeyOwner
- type ProjectApiKeyResponse
- type ProjectDescription
- type ProjectRateLimit
- type ProjectRateLimitDescription
- type ProjectRateLimitResponse
- type ProjectResponse
- type ProjectServiceAccount
- type ProjectServiceAccountDescription
- type ProjectServiceAccountResponse
- type ProjectUser
- type ProjectUserDescription
- type ProjectUserResponse
- type ResponseFormatJsonObject
- type ResponseFormatJsonSchema
- type ResponseFormatJsonSchemaJsonSchema
- type ResponseFormatText
- type VectorStoreDescription
- type VectorStoreExpirationAfter
- type VectorStoreObjectFileCounts
- type VectorStoreResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountCredentialsFromMap ¶
func AccountCredentialsFromMap(m map[string]any) (model.IntegrationCredentials, error)
AccountCredentialsFromMap TODO: converts a map to a configs.IntegrationCredentials.
func AdjustResource ¶
func AdjustResource(job describe.DescribeJob, resource *model.Resource) error
AdjustResource TODO: Do any needed adjustment on resource object before storing
func DescribeListByOpenAI ¶
func DescribeListByOpenAI(describe func(context.Context, *OpenAIAPIHandler, *model.StreamSender) ([]model.Resource, error)) model.ResourceDescriber
DescribeListByOpenAI A wrapper to pass openai authorization to describer list functions
func DescribeSingleByOpenAI ¶
func DescribeSingleByOpenAI(describe func(context.Context, *OpenAIAPIHandler, string) (*model.Resource, error)) model.SingleResourceDescriber
DescribeSingleByOpenAI A wrapper to pass openai authorization to describer get functions
func GetAdditionalParameters ¶
func GetAdditionalParameters(job describe.DescribeJob) (map[string]string, error)
GetAdditionalParameters TODO: pass additional parameters needed in describer wrappers in /provider/describer_wrapper.go
func GetResourceMetadata ¶
func GetResourceMetadata(job describe.DescribeJob, resource model.Resource) (map[string]string, error)
GetResourceMetadata TODO: Get metadata as a map to add to the resources
func WithTriggerType ¶
Types ¶
type AssistantDescription ¶
type AssistantDescription struct { //Object string //CreatedAt time.Time ID string `json:"id"` Name *string `json:"name"` Description *string `json:"description"` Model string `json:"model"` Instructions *string `json:"instructions"` Tools []interface{} `json:"tools"` ToolResources *interface{} `json:"tool_resources"` Metadata map[string]interface{} `json:"metadata"` Temperature *float32 `json:"temperature"` TopP *float32 `json:"top_p"` }
type AssistantObjectToolResources ¶
type AssistantObjectToolResources struct { CodeInterpreter *AssistantObjectToolResourcesCodeInterpreter `json:"code_interpreter,omitempty"` FileSearch *AssistantObjectToolResourcesFileSearch `json:"file_search,omitempty"` }
type AssistantObjectToolResourcesCodeInterpreter ¶
type AssistantObjectToolResourcesCodeInterpreter struct {
FileIds []string `json:"file_ids,omitempty"`
}
type AssistantObjectToolResourcesFileSearch ¶
type AssistantObjectToolResourcesFileSearch struct {
VectorStoreIds []string `json:"vector_store_ids,omitempty"`
}
type AssistantObjectToolsInner ¶
type AssistantObjectToolsInner struct { AssistantToolsCode *AssistantToolsCode AssistantToolsFileSearch *AssistantToolsFileSearch AssistantToolsFunction *AssistantToolsFunction }
type AssistantResponse ¶
type AssistantResponse struct { Data []AssistantDescription `json:"data"` LastID string `json:"last_id"` HasMore bool `json:"has_more"` }
type AssistantToolsCode ¶
type AssistantToolsCode struct {
Type string `json:"type"`
}
type AssistantToolsFileSearch ¶
type AssistantToolsFileSearch struct { Type string `json:"type"` FileSearch *AssistantToolsFileSearchFileSearch `json:"file_search,omitempty"` }
type AssistantToolsFileSearchFileSearch ¶
type AssistantToolsFileSearchFileSearch struct { MaxNumResults *int32 `json:"max_num_results,omitempty"` RankingOptions *FileSearchRankingOptions `json:"ranking_options,omitempty"` }
type AssistantToolsFunction ¶
type AssistantToolsFunction struct { Type string `json:"type"` Function FunctionObject `json:"function"` }
type FileDescription ¶
type FileResponse ¶
type FileResponse struct { Data []FileDescription `json:"data"` LastID string `json:"last_id"` HasMore bool `json:"has_more"` }
type FunctionObject ¶
type FunctionObject struct { Description *string `json:"description,omitempty"` Name string `json:"name"` Parameters map[string]interface{} `json:"parameters,omitempty"` Strict NullableBool `json:"strict,omitempty"` }
type ModelsDescription ¶
type ModelsResponse ¶
type ModelsResponse struct {
Data []ModelsDescription `json:"data"`
}
type NullableBool ¶
type NullableBool struct {
// contains filtered or unexported fields
}
type NullableInt32 ¶
type NullableInt32 struct {
// contains filtered or unexported fields
}
type OpenAIAPIHandler ¶
type OpenAIAPIHandler struct { Client *http.Client APIKey string OrganizationID string ProjectID string RateLimiter *rate.Limiter Semaphore chan struct{} MaxRetries int RetryBackoff time.Duration }
func NewOpenAIAPIHandler ¶
type Permission ¶
type Permission struct { CreatedAt int64 `json:"created"` ID string `json:"id"` Object string `json:"object"` AllowCreateEngine bool `json:"allow_create_engine"` AllowSampling bool `json:"allow_sampling"` AllowLogprobs bool `json:"allow_logprobs"` AllowSearchIndices bool `json:"allow_search_indices"` AllowView bool `json:"allow_view"` AllowFineTuning bool `json:"allow_fine_tuning"` Organization string `json:"organization"` Group interface{} `json:"group"` IsBlocking bool `json:"is_blocking"` }
type ProjectApiKey ¶
type ProjectApiKeyDescription ¶
type ProjectApiKeyDescription struct { ProjectApiKey ProjectID string `json:"project_id"` }
type ProjectApiKeyOwner ¶
type ProjectApiKeyOwner struct { Type *string `json:"type,omitempty"` User *ProjectUser `json:"user,omitempty"` ServiceAccount *ProjectServiceAccount `json:"service_account,omitempty"` }
type ProjectApiKeyResponse ¶
type ProjectApiKeyResponse struct { Data []ProjectApiKey `json:"data"` LastID string `json:"last_id"` HasMore bool `json:"has_more"` }
type ProjectDescription ¶
type ProjectRateLimit ¶
type ProjectRateLimit struct { Object string `json:"object"` ID string `json:"id"` Model string `json:"model"` MaxRequestsPer1Minute int32 `json:"max_requests_per_1_minute"` MaxTokensPer1Minute int32 `json:"max_tokens_per_1_minute"` MaxImagesPer1Minute *int32 `json:"max_images_per_1_minute"` MaxAudioMegabytesPer1Minute *int32 `json:"max_audio_megabytes_per_1_minute"` MaxRequestsPer1Day *int32 `json:"max_requests_per_1_day"` Batch1DayMaxInputTokens *int32 `json:"batch_1_day_max_input_tokens"` }
type ProjectRateLimitDescription ¶
type ProjectRateLimitDescription struct { ProjectRateLimit ProjectID string `json:"project_id"` }
type ProjectRateLimitResponse ¶
type ProjectRateLimitResponse struct { Data []ProjectRateLimit `json:"data"` LastID string `json:"last_id"` HasMore bool `json:"has_more"` }
type ProjectResponse ¶
type ProjectResponse struct { Data []ProjectDescription `json:"data"` LastID string `json:"last_id"` HasMore bool `json:"has_more"` }
type ProjectServiceAccount ¶
type ProjectServiceAccountDescription ¶
type ProjectServiceAccountDescription struct { ProjectServiceAccount ProjectID string `json:"project_id"` }
type ProjectServiceAccountResponse ¶
type ProjectServiceAccountResponse struct { Data []ProjectServiceAccount `json:"data"` LastID string `json:"last_id"` HasMore bool `json:"has_more"` }
type ProjectUser ¶
type ProjectUserDescription ¶
type ProjectUserResponse ¶
type ProjectUserResponse struct { Data []ProjectUser `json:"data"` LastID string `json:"last_id"` HasMore bool `json:"has_more"` }
type ResponseFormatJsonObject ¶
type ResponseFormatJsonObject struct {
Type string `json:"type"`
}
type ResponseFormatJsonSchema ¶
type ResponseFormatJsonSchema struct { Type string `json:"type"` JsonSchema ResponseFormatJsonSchemaJsonSchema `json:"json_schema"` }
type ResponseFormatJsonSchemaJsonSchema ¶
type ResponseFormatJsonSchemaJsonSchema struct { Description *string `json:"description,omitempty"` Name string `json:"name"` Schema map[string]interface{} `json:"schema,omitempty"` Strict NullableBool `json:"strict,omitempty"` }
type ResponseFormatText ¶
type ResponseFormatText struct {
Type string `json:"type"`
}
type VectorStoreDescription ¶
type VectorStoreDescription struct { ID string `json:"id"` Object string `json:"object"` CreatedAt int32 `json:"created_at"` Name string `json:"name"` UsageBytes int32 `json:"usage_bytes"` FileCounts VectorStoreObjectFileCounts `json:"file_counts"` Status string `json:"status"` ExpiresAfter *VectorStoreExpirationAfter `json:"expires_after"` ExpiresAt *int32 `json:"expires_at"` LastActiveAt *int32 `json:"last_active_at"` Metadata map[string]interface{} `json:"metadata"` }
type VectorStoreResponse ¶
type VectorStoreResponse struct { Data []VectorStoreDescription `json:"data"` LastID string `json:"last_id"` HasMore bool `json:"has_more"` }
Click to show internal directories.
Click to hide internal directories.