Invoke OpenAI Models
Lists available OpenAI models.
This example provides a sample configuration for the Invoke OpenAI Models policy. For more information on the policy parameter descriptions, see DataPower Nano Gateway documentation.
kind: InvokeOpenAiModels
apiVersion: api.ibm.com/v1
metadata:
name: invoke-openai-models-policy
namespace: sample
version: '1.0'
spec:
inputMessage: 'request' # Optional - default value is request
outputMessage: 'response' # Optional - default value is response
tlsClientProfile: 'aiEndpointTlsClientProfile'
orgId: 'organizationId' # Optional
projectId: 'watsonxAiProjectId' # Optional
apiKeySecret: '*****' # The name of a Kubernetes Secret which holds the OpenAI API Key. The Secret must contain data literal "openAiApiKey" whose value is the API Key to use for authentication.