胜算云Router文档
胜算云Router
胜算云Router
    • 快速入门
    • Quick start
    • 模型路由
    • model routing
    • 联网搜索
    • Online search
    • 工具和函数调用
    • Tool and function calling
    • 常见问题
    • 错误处理
    • 使用条款
    • 隐私政策
    • 付费充值协议
    • cherry studio和chat box配置指南
    • 数据安全协议和分析
    • MCP安装
    • Roo code配置
    • 胜算云Router开放平台服务协议
    • MCP installing
    • 如何在KiloSSY中使用胜算云Router
    • API文档
      • API 错误代码说明
      • 聊天补全
        POST
      • 文本向量化
        POST
      • 多模态向量化
        POST
      • 图像生成
        POST
      • 文本分词
        POST
      • 文本重排序
        POST

    Online search

    Here is the English translation:

    Shengsuan Cloud Router provides online search functionality. Simply add "online_search": true to your request body to enable this feature.

    Python Example: Handling Streaming Responses with Online Search#

    Best Practices for Effective Online Search Usage:#

    1.
    Fact-based questions: Online search works best for queries requiring up-to-date information or specific facts, such as:
    "Today's weather"
    "Latest movie releases"
    "Current stock prices"
    2.
    Multi-turn conversations: For extended dialogues:
    Include previous context with new questions
    The model will perform online searches based on the full conversation history
    3.
    Display search results effectively:
    Client applications should prominently display search results
    Format references in model responses for better readability
    Consider separating raw search data from generated content in your UI

    Key Implementation Notes:#

    The streaming response includes three special data types:
    1.
    search_queries: Actual search terms generated by the model
    2.
    search_results: Raw content retrieved from web sources
    3.
    search_indexes: Source references/citations
    Regular content streams simultaneously with search metadata
    Requires Server-Sent Events (SSE) handling for real-time processing
    Ensure you have the sseclient Python package installed (pip install sseclient-py)
    修改于 2025-05-29 04:18:20
    上一页
    联网搜索
    下一页
    工具和函数调用
    Built with