Remove AI config approval flow
This commit is contained in:
@@ -22,9 +22,10 @@ type LlmConfigSuggestionRequest struct {
|
||||
}
|
||||
|
||||
type LlmConfigSuggestionResponse struct {
|
||||
ServerInstanceID string `json:"serverInstanceId"`
|
||||
Recommendation string `json:"recommendation"`
|
||||
SuggestedConfig string `json:"suggestedConfig,omitempty"`
|
||||
ServerInstanceID string `json:"serverInstanceId"`
|
||||
Recommendation string `json:"recommendation"`
|
||||
SuggestedConfig string `json:"suggestedConfig,omitempty"`
|
||||
ConfigExecution *AIConfigExecutionResponse `json:"configExecution,omitempty"`
|
||||
}
|
||||
|
||||
type AIInvocationUsageResponse struct {
|
||||
@@ -39,8 +40,11 @@ type AIConfigRecommendationResponse struct {
|
||||
Key string `json:"key"`
|
||||
SuggestedConfig string `json:"suggestedConfig,omitempty"`
|
||||
DiffSummary string `json:"diffSummary"`
|
||||
DiffID string `json:"diffId,omitempty"`
|
||||
ExpiresAt string `json:"expiresAt,omitempty"`
|
||||
}
|
||||
|
||||
type AIConfigExecutionResponse struct {
|
||||
Status string `json:"status"`
|
||||
Job JobResponse `json:"job"`
|
||||
}
|
||||
|
||||
type AIInvocationSafeErrorResponse struct {
|
||||
@@ -57,6 +61,7 @@ type AIInvocationResponse struct {
|
||||
Status string `json:"status"`
|
||||
Recommendation string `json:"recommendation,omitempty"`
|
||||
ConfigRecommendation *AIConfigRecommendationResponse `json:"configRecommendation,omitempty"`
|
||||
ConfigExecution *AIConfigExecutionResponse `json:"configExecution,omitempty"`
|
||||
Usage AIInvocationUsageResponse `json:"usage"`
|
||||
Error *AIInvocationSafeErrorResponse `json:"error,omitempty"`
|
||||
}
|
||||
@@ -84,10 +89,12 @@ func AIInvocationFromDomain(response domain.AIInvocationResponse) AIInvocationRe
|
||||
Key: response.ConfigRecommendation.Key,
|
||||
SuggestedConfig: response.ConfigRecommendation.SuggestedConfig,
|
||||
DiffSummary: response.ConfigRecommendation.DiffSummary,
|
||||
DiffID: response.ConfigRecommendation.DiffID,
|
||||
ExpiresAt: response.ConfigRecommendation.ExpiresAt,
|
||||
}
|
||||
}
|
||||
var execution *AIConfigExecutionResponse
|
||||
if response.ConfigExecution != nil {
|
||||
execution = &AIConfigExecutionResponse{Status: response.ConfigExecution.Status, Job: JobFromDomain(response.ConfigExecution.Job)}
|
||||
}
|
||||
var safeError *AIInvocationSafeErrorResponse
|
||||
if response.Error != nil {
|
||||
safeError = &AIInvocationSafeErrorResponse{Code: response.Error.Code, Message: response.Error.Message, Details: response.Error.Details}
|
||||
@@ -100,6 +107,7 @@ func AIInvocationFromDomain(response domain.AIInvocationResponse) AIInvocationRe
|
||||
Status: response.Status,
|
||||
Recommendation: response.Recommendation,
|
||||
ConfigRecommendation: config,
|
||||
ConfigExecution: execution,
|
||||
Usage: AIInvocationUsageResponse{
|
||||
ProviderID: response.Usage.ProviderID,
|
||||
Model: response.Usage.Model,
|
||||
|
||||
Reference in New Issue
Block a user