TencentChatLanguageModel
Namespace: Vercel.AI.Tencent
public sealed class TencentChatLanguageModel : OpenAICompatibleLanguageModel, ILanguageModelTokenHub chat completions over the OpenAI-compatible protocol. Serializes its own config because the URL is rebuilt from the base URL when the model is restored.
Inheritance: object → OpenAICompatibleLanguageModel
Implements: ILanguageModel
Constructors
Section titled “Constructors”TencentChatLanguageModel(TencentProvider, string)
Section titled “TencentChatLanguageModel(TencentProvider, string)”public TencentChatLanguageModel(TencentProvider provider, string modelId)Creates a model.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
TencentProvider | |
modelId |
string |
Methods
Section titled “Methods”Deserialize(SerializedModelOptions, string?, HttpMessageHandler?)
Section titled “Deserialize(SerializedModelOptions, string?, HttpMessageHandler?)”public static TencentChatLanguageModel Deserialize(SerializedModelOptions serialized, string? apiKey = null, HttpMessageHandler? handler = null)Restores a model from Serialize(). Maps to [WORKFLOW_DESERIALIZE].
Parameters
| Name | Type | Description |
|---|---|---|
serialized |
SerializedModelOptions | The serialized model id and config. |
apiKey |
string | API key. Defaults to the TENCENT_TOKENHUB_API_KEY environment variable. |
handler |
HttpMessageHandler | HTTP handler. Pass one from tests. |
Returns: TencentChatLanguageModel
Serialize()
Section titled “Serialize()”public SerializedModelOptions Serialize()Serializes the model id and config for a workflow boundary. Maps to [WORKFLOW_SERIALIZE].
The API key is not part of the serialized config. Pass it to HttpMessageHandler).
Returns: SerializedModelOptions
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product