Tüm Ürünler
Search
Belge Merkezi

:GenerateCopilotStreamResponse

Son Güncelleme:Oct 03, 2026

OS Copilot hizmeti için akışlı bir SSE arabirimi sağlar.

Operation description

  • Bu işlemi aliyun-tea-openapi-inner paketindeki call_sseapi arabirimi ile birlikte kullanın.

  • Parametreleri standart LLM hizmeti giriş parametrelerine göre doldurun, bunları bir dizeye dönüştürün ve dizeyi llmParamString parametresine atayın.

  • Kullanmadan önce döndürülen dize verilerini bir dict yapısına dönüştürün. Standart LLM hizmeti yanıt biçimine bakın.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sysom:GenerateCopilotStreamResponse

none

*All Resource

*

None None

Request syntax

POST /api/v1/copilot/generate_copilot_stream_response HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

İstek gövdesi.

llmParamString

string

No

Copilot LLM hizmeti için giriş parametresi. Standart LLM arabirimi giriş parametresi dict yapısına bakın. Dict yapısını bir dizeye dönüştürün ve llmParamString parametresine iletin.

"{\"model\":\"Qwen-7B-Chat\",\"temperature\":0.9,\"max_tokens\":1000,\"top_p\":1,\"frequency_penalty\":0.0,\"presence_penalty\":0.6,\"messages\":[{\"role\":\"user\",\"content\":\"I am an OS engineer\"},{\"role\":\"assistant\",\"content\":\"Hello. I am an AI language model, happy to help you. What can I do for you?\"},{\"role\":\"user\",\"content\":\"Do you know what Alinux is?\"}]}"

Response elements

Element

Type

Description

Example

object

Yanıt şeması.

code

string

Hata kodu.

SysomOpenAPI.ServerError

data

string

LLM hizmeti tarafından dize biçiminde döndürülen veriler. Veriler bir dict yapısıysa, bunu kendiniz dönüştürün ve ayrıştırın.

{'choices': [{'finish_reason': 'stop', 'index': 0, 'message': {'content': 'Alinux is a Linux-based open source operating system primarily developed and maintained by Alibaba Group, designed for large-scale cloud computing and big data processing environments. The system has been deeply customized and optimized for high concurrency, low latency, and resource utilization to meet the complex and massive business requirements within Alibaba. Due to its excellent performance and stability, Alinux has gradually been adopted by external enterprises and research institutions, especially in areas that require handling high-load scenarios. Compared with standard Linux distributions, Alinux may include specific kernel patches, optimization toolsets, and other features developed internally by Alibaba. However, it is worth noting that although the "Ali" in the name may suggest a close relationship with Alibaba, Alinux as a project became a sub-project under the OpenAtom Foundation in 2021, known as OpenAnolis, marking its progress toward community-driven and broader adoption.', 'role': 'assistant'}}], 'model': 'Qwen1.5', 'sentiment': [], 'status_code': 200, 'time': 6.836989402770996, 'usage': {'completion_tokens': 180, 'prompt_tokens': 176, 'time_dict': {'auto_regression_time': 0.03798324399524265, 'speed': 26.327398474054736, 'total_generate_time': 6.836983919143677}, 'total_tokens': 356}}

message

string

Hata mesajı. Herhangi bir hata oluşmazsa bu değer boştur.

Requests for llm service failed

requestId

string

İstek kimliği.

2D693121-C925-5154-8DF6-C09A8B369822

Examples

Success response

JSON format

{
  "code": "SysomOpenAPI.ServerError\n",
  "data": "{'choices': [{'finish_reason': 'stop', 'index': 0, 'message': {'content': 'Alinux is a Linux-based open source operating system primarily developed and maintained by Alibaba Group, designed for large-scale cloud computing and big data processing environments. The system has been deeply customized and optimized for high concurrency, low latency, and resource utilization to meet the complex and massive business demands within Alibaba. Due to its excellent performance and stability, Alinux has gradually been adopted by external enterprises and research institutions, especially in areas that require handling high-load scenarios. Compared to standard Linux distributions, Alinux may include specific kernel patches, optimization toolsets, and other features developed internally by Alibaba. However, it is worth noting that although the \"Ali\" in the name may suggest a close relationship with Alibaba, Alinux as a project became a sub-project under the OpenAtom Foundation in 2021, known as OpenAnolis, marking its progression toward community-driven and broader adoption.', 'role': 'assistant'}}], 'model': 'Qwen1.5', 'sentiment': [], 'status_code': 200, 'time': 6.836989402770996, 'usage': {'completion_tokens': 180, 'prompt_tokens': 176, 'time_dict': {'auto_regression_time': 0.03798324399524265, 'speed': 26.327398474054736, 'total_generate_time': 6.836983919143677}, 'total_tokens': 356}}",
  "message": "Requests for llm service failed\n",
  "requestId": "2D693121-C925-5154-8DF6-C09A8B369822\n"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.