This commit is contained in:
@@ -15,6 +15,7 @@ type LLMInferenceInput struct {
|
||||
UserPrompt string `json:"user_prompt"` // User message
|
||||
Temperature float64 `json:"temperature,omitempty"` // LLM temperature (0-1)
|
||||
MaxTokens int `json:"max_tokens,omitempty"` // Max output tokens
|
||||
AuthToken string `json:"auth_token,omitempty"` // JWT token for authenticated endpoints
|
||||
}
|
||||
|
||||
// LLMInferenceOutput is output from LLMInferenceActivity
|
||||
@@ -53,7 +54,7 @@ func LLMInferenceActivity(ctx context.Context, in LLMInferenceInput) (LLMInferen
|
||||
}
|
||||
|
||||
// Call LLM
|
||||
logger.logf("info", "Calling LLM API (model=%s, prompt_len=%d)", in.Model, len(in.UserPrompt))
|
||||
logger.logf("info", "Calling LLM API (model=%s, prompt_len=%d, auth=%v)", in.Model, len(in.UserPrompt), in.AuthToken != "")
|
||||
|
||||
response, err := client.CreateMessage(ctx, llm.MessageInput{
|
||||
Model: statemachine.ModelSpec{
|
||||
@@ -66,6 +67,7 @@ func LLMInferenceActivity(ctx context.Context, in LLMInferenceInput) (LLMInferen
|
||||
Content: in.UserPrompt,
|
||||
},
|
||||
},
|
||||
AuthToken: in.AuthToken,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
@@ -88,6 +90,7 @@ type LLMBatchInferenceInput struct {
|
||||
SystemPrompt string `json:"system_prompt"`
|
||||
Prompts []string `json:"prompts"` // List of user prompts
|
||||
Temperature float64 `json:"temperature,omitempty"`
|
||||
AuthToken string `json:"auth_token,omitempty"` // JWT token for authenticated endpoints
|
||||
}
|
||||
|
||||
// LLMBatchInferenceOutput is output from batch inference
|
||||
|
||||
Reference in New Issue
Block a user