refactor: update session title generation and language context handling
- Modified the session title generation template to focus on extracting only the intent of the user's question. - Enhanced the session service to include language context when generating titles. - Updated middleware to inject language into the request context. - Added a new test suite for validating SSRF safety of URLs.
This commit is contained in:
@@ -42,6 +42,7 @@ func Language() gin.HandlerFunc {
|
||||
}
|
||||
|
||||
// Inject into context
|
||||
c.Set(types.LanguageContextKey.String(), lang)
|
||||
ctx := context.WithValue(c.Request.Context(), types.LanguageContextKey, lang)
|
||||
c.Request = c.Request.WithContext(ctx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user