Skip to content

Commit

Permalink
fixing ai configuration in dp to cp flow
Browse files Browse the repository at this point in the history
  • Loading branch information
CrowleyRajapakse committed Oct 18, 2024
1 parent 39a59dd commit a44a89b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions adapter/internal/controlplane/eventPublisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ type AIRL struct {

// AIConfiguration holds the AI configuration
type AIConfiguration struct {
LLMProviderID string `json:"llmProviderID"`
LLMProviderName string `json:"llmProviderName"`
LLMProviderAPIVersion string `json:"llmProviderAPIVersion"`
}
Expand Down
2 changes: 2 additions & 0 deletions adapter/internal/operator/controllers/dp/api_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2970,10 +2970,12 @@ func (apiReconciler *APIReconciler) convertAPIStateToAPICp(ctx context.Context,
}
subType := "DEFAULT"
aiConfiguration := controlplane.AIConfiguration{}
loggers.LoggerAPKOperator.Debugf("AI Provider in state: %+v", apiState.AIProvider)
if apiState.AIProvider != nil {
loggers.LoggerAPKOperator.Debugf("AIProvider is found")
subType = "AIAPI"
aiConfiguration = controlplane.AIConfiguration{
LLMProviderID: apiState.AIProvider.ObjectMeta.Name,
LLMProviderName: apiState.AIProvider.Spec.ProviderName,
LLMProviderAPIVersion: apiState.AIProvider.Spec.ProviderAPIVersion,
}
Expand Down

0 comments on commit a44a89b

Please sign in to comment.