Giga Request#
Requests to the AI model using the request library#
Module of the GigaChatAI model.
- class giga_request.BaseAIText[source]#
AI text-chat-model base class.
- abstract async static request(request_of_user, token_giga, temperature_giga, top_p_giga, n_giga, auth_token_giga)[source]#
Answer for the user from the request (from the user) by some AI Model.
- Parameters:
request_of_user (str) – Request from the user.
token_giga (str) – Token of some AI Model.
temperature_giga (float) – Temperature of an answer.
top_p_giga (float) – Alternative to temperature.
n_giga (int) – Quality and count answer for the generated.
auth_token_giga (str) – Authorization token of some AI Model.
- Returns:
Result.
- Return type:
str
- class giga_request.GetAuthTokenSber[source]#
The base class for obtaining a token AI SBER API (GigaChat API).
- class giga_request.GigaChatLight[source]#
The class of AI-text model GigaChat. Version of the AI-assistance: GigaLight.
- async static request(request_of_user, token_giga, temperature_giga, top_p_giga, n_giga, auth_token_giga)[source]#
Answer for the user from the request (from the user) by GigaChatLight. Light answers (‘Really’ Light).
- Parameters:
request_of_user (str) – Request from the user.
token_giga (str) – Token of the GigaChatAI.
temperature_giga (float) – Temperature of an answer.
top_p_giga (float) – Alternative to temperature.
n_giga (int) – Quality and count answer for the generated.
auth_token_giga (str) – Authorization token of the GigaChatAI.
- Return type:
str
- class giga_request.GigaChatPro[source]#
The class of AI-text model GigaChat. Version of the AI-assistance: GigaPro.
- async static request(request_of_user, token_giga, temperature_giga, top_p_giga, n_giga, auth_token_giga)[source]#
Answer for the user from the request (from the user) by GigaChatPRO. Limited Version of the Answers for the user. Premium answers (PRO).
- Parameters:
request_of_user (str) – Request from the user.
token_giga (str) – Token of the GigaChatAI.
temperature_giga (float) – Temperature of an answer.
top_p_giga (float) – Alternative to temperature.
n_giga (int) – Quality and count answer for the generated.
auth_token_giga (str) – Authorization token of the GigaChatAI.
- Returns:
Result.
- Return type:
str
- class giga_request.GigaImagePro[source]#
Class of generate images for premium-users.
- async static request(request, auth_token_giga, token_giga)[source]#
Create image for Premium users.
- Parameters:
request (str) – Request / Query from the user.
auth_token_giga (str) – Authorization token for GigaChatAI (requests only now).
token_giga (str) – Token for requests.
- Returns:
Image data | Result (str).
- Return type:
bytes | str