class BaseGptResponse
BaseGptResponse is a data model class that represents a base GPT response entity in the Microsoft SharePoint Internal API, inheriting from ClientValue.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/gtp/base_response.py
4 - 9
simple
Purpose
This class serves as a base data transfer object (DTO) for GPT-related responses in the Office365 SharePoint API. It provides a standardized entity type identifier for serialization and communication with SharePoint's internal GPT services. The class is designed to be extended by more specific GPT response types and integrates with the Office365 client value framework for proper data handling and serialization.
Source Code
class BaseGptResponse(ClientValue):
""""""
@property
def entity_type_name(self):
return "Microsoft.SharePoint.Internal.BaseGptResponse"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
__init__: The constructor parameters are inherited from ClientValue base class. No explicit constructor is defined in this class, so it uses the parent class's initialization logic.
Return Value
Instantiation returns a BaseGptResponse object that can be used to represent GPT response data in SharePoint API interactions. The entity_type_name property returns a string 'Microsoft.SharePoint.Internal.BaseGptResponse' which identifies this entity type in the SharePoint API.
Class Interface
Methods
@property
def entity_type_name(self) -> str
property
Purpose: Returns the entity type identifier used by SharePoint's internal API to identify this object type during serialization and deserialization
Returns: A string constant 'Microsoft.SharePoint.Internal.BaseGptResponse' that identifies this entity type in the SharePoint API
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
entity_type_name |
str | Read-only property that returns the SharePoint entity type identifier for this class | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
Usage Example
from office365.runtime.client_value import ClientValue
from your_module import BaseGptResponse
# Instantiate the base GPT response
gpt_response = BaseGptResponse()
# Access the entity type name
entity_type = gpt_response.entity_type_name
print(entity_type) # Output: 'Microsoft.SharePoint.Internal.BaseGptResponse'
# This class is typically used as a base class for more specific GPT response types
class SpecificGptResponse(BaseGptResponse):
def __init__(self, content=None):
super().__init__()
self.content = content
specific_response = SpecificGptResponse(content='AI generated content')
Best Practices
- This class is intended to be used as a base class for more specific GPT response types rather than instantiated directly
- The entity_type_name property should not be overridden unless creating a completely different entity type
- When extending this class, ensure proper initialization by calling super().__init__() if you override the constructor
- This class integrates with the Office365 serialization framework, so additional properties should follow ClientValue conventions
- The class is designed for use within the Office365 SharePoint API context and may not function properly in isolation
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class BaseGptRequestOptions 80.6% similar
-
class ActivityClientResponse 65.9% similar
-
class ReportBase 62.5% similar
-
class RecentAndJoinedTeamsResponse 61.8% similar
-
class ChatGptRequestOptions 61.6% similar