feat: add web search block functionality and integrate with existing plugins
- Introduced a new web search block plugin to handle web search queries and results. - Updated copilot, doc block, and pro block plugins to include web search context in AI completions. - Implemented utility functions for parsing and building web search markdown. - Enhanced API to support web search requests and responses. - Added configuration for web search URL and timeout settings. - Updated size limit checks to account for web search content.
This commit is contained in:
@@ -47,6 +47,16 @@ def resolve_llm_policy(job_type: str, request_payload: dict[str, Any], config: R
|
||||
temperature=config.pro_temperature,
|
||||
thinking=_normalize_thinking(request_payload.get("pro_thinking"), allow_high=True) or "medium",
|
||||
)
|
||||
if job_type == "web_search":
|
||||
return LLMPolicy(
|
||||
job_type=job_type,
|
||||
model=config.web_search_model,
|
||||
profile="completion",
|
||||
max_input_chars=config.web_search_max_input_chars,
|
||||
max_output_tokens=config.web_search_max_output_tokens,
|
||||
temperature=config.web_search_temperature,
|
||||
thinking="low",
|
||||
)
|
||||
if job_type == "compress":
|
||||
return LLMPolicy(
|
||||
job_type=job_type,
|
||||
|
||||
Reference in New Issue
Block a user