Skip to content

Commit

Permalink
Merge pull request #2591 from CrowleyRajapakse/testalpha
Browse files Browse the repository at this point in the history
Fixing ai configuration in dp to cp flow
  • Loading branch information
CrowleyRajapakse authored Oct 19, 2024
2 parents 39a59dd + a44a89b commit 4d2c17d
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 4d2c17d

Please sign in to comment.