🔍 Code Extractor

class BaseGptResponse

Maturity: 27

BaseGptResponse is a data model class that represents a base GPT response entity in the Microsoft SharePoint Internal API, inheriting from ClientValue.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/gtp/base_response.py
Lines:
4 - 9
Complexity:
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

    BaseGptRequestOptions is a base class that inherits from ClientValue, serving as a foundation for GPT request configuration options in the Office365 library.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/gtp/base_request_options.py
  • class ActivityClientResponse 65.9% similar

    A client value class representing an ActivityClientResponse entity from Microsoft SharePoint Activities API.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/activities/client_response.py
  • class ReportBase 62.5% similar

    ReportBase is a base class representing a report entity in Microsoft Office Server Search REST API, inheriting from ClientValue to provide client-side value representation.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/reports/base.py
  • class RecentAndJoinedTeamsResponse 61.8% similar

    A data transfer object representing a response containing information about recent and joined Microsoft Teams in SharePoint Portal.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/teams/recent_and_joined_response.py
  • class ChatGptRequestOptions 61.6% similar

    A class representing request options for ChatGPT API calls in SharePoint, specifically managing a collection of message entries for conversation context.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/gtp/request_options.py
← Back to Browse