AI Provider
Package v1alpha3 contains the API Schema definitions for WSO2 APK.
Resource Types:
AIProvider ¶
AIProvider is the schema for the AI providers API
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
metadata
Kubernetes meta/v1.ObjectMeta
|
Refer to the Kubernetes API documentation for the fields of the
metadata field.
|
||||||||||
spec
AIProviderSpec
|
|
||||||||||
status
AIProviderStatus
|
AIProviderSpec ¶
(Appears on: AIProvider)
AIProviderSpec defines the desired state of AIProvider
Field | Description |
---|---|
providerName
string
|
Name of the AI provider |
providerAPIVersion
string
|
AI provider version |
organization
string
|
Organization the AI Provider belongs to. |
model
ValueDetails
|
Contains configuration about, from where the model related values are coming. |
rateLimitFields
RateLimitFields
|
Contains configuration about, from where token count related info coming. |
RateLimitFields ¶
(Appears on: AIProviderSpec)
RateLimitFields defines the Rate Limit fields
Field | Description |
---|---|
promptTokens
ValueDetails
|
Token count of the promt in the AI request. |
completionToken
ValueDetails
|
Token count of the response in the AI request. |
totalToken
ValueDetails
|
Total token count of both promt and completion in a AI request response flow. |
ValueDetails ¶
(Appears on: AIProviderSpec, RateLimitFields)
ValueDetails defines the value details
Field | Description |
---|---|
in
string
|
In which part of the response the data comes in. (Header|Body) |
value
string
|
If In is Header, name of the header. If the In is body, json path of the value. |
AIProviderStatus ¶
(Appears on: AIProvider)
AIProviderStatus defines the observed state of AIProvider
Generated with gen-crd-api-reference-docs
.
AI Provider Sample¶
In the following CR, we have defined a AI Provider by giving the name, version, organization, model, and rate limit fields information for the AI Provider.
apiVersion: dp.wso2.com/v1alpha3
kind: AIProvider
metadata:
name: ai-provider-azure-ai
namespace: apk
spec:
providerName : "AzureAI"
providerAPIVersion : "2024-06-01"
organization : "default"
model:
in: "Body"
value: "model"
rateLimitFields:
promptTokens:
in: "Body"
value: "$usage.promptTokens"
completionToken:
in: "Body"
value: "$usage.completionTokens"
totalToken:
in: "Body"
value: "$usage.totalTokens"
Refer Manage AI Providers for more information on how to configure APIs.