🔍 Code Extractor

class BaseGptRequestOptions

Maturity: 22

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

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/gtp/base_request_options.py
Lines:
4 - 5
Complexity:
simple

Purpose

This class acts as a base class for defining GPT (likely referring to SharePoint's Graph API or similar Office365 GPT-related functionality) request options. It inherits from ClientValue, which is part of the Office365 runtime framework for handling client-side values that can be serialized and sent to Office365 services. This class is intended to be extended by more specific request option classes that define actual configuration parameters for GPT-related operations.

Source Code

class BaseGptRequestOptions(ClientValue):
    """"""

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

bases: Inherits from ClientValue, which provides base functionality for client-side value objects in the Office365 SDK. This inheritance enables serialization and integration with Office365 service requests.

Return Value

Instantiation returns a BaseGptRequestOptions object. As this is a base class with no defined methods or attributes in the provided code, it primarily serves as a type marker and foundation for derived classes. Methods from the parent ClientValue class would be available.

Class Interface

Methods

__init__()

Purpose: Initializes a BaseGptRequestOptions instance by calling the parent ClientValue constructor

Returns: None (constructor)

Dependencies

  • office365

Required Imports

from office365.runtime.client_value import ClientValue

Usage Example

# This is a base class and typically should not be instantiated directly
# Instead, create a derived class:

from office365.runtime.client_value import ClientValue

class BaseGptRequestOptions(ClientValue):
    pass

class CustomGptRequestOptions(BaseGptRequestOptions):
    def __init__(self, model=None, temperature=None):
        super().__init__()
        self.model = model
        self.temperature = temperature

# Usage of derived class
options = CustomGptRequestOptions(model="gpt-4", temperature=0.7)

# Note: Actual usage would depend on the specific Office365 service integration

Best Practices

  • This is a base class and should not be instantiated directly; create derived classes that add specific GPT request configuration attributes
  • Derived classes should define specific attributes needed for GPT request configuration (e.g., model, temperature, max_tokens)
  • Follow the ClientValue pattern from Office365 SDK for proper serialization and integration with Office365 services
  • Ensure derived classes properly call super().__init__() to maintain the inheritance chain
  • Use this class as a type marker to ensure consistency across GPT-related request option classes in the Office365 context

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class BaseGptResponse 80.6% similar

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

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/gtp/base_response.py
  • class ChatGptRequestOptions 72.3% 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
  • class SharePointOneDriveOptions 62.8% similar

    A data class that encapsulates search content options for SharePoint and OneDrive searches performed using application permissions.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/search/sharepoint_onedrive_options.py
  • class CallOptions 61.0% similar

    A data class that encapsulates optional configuration features for Microsoft Teams/Office 365 call functionality, specifically controlling bot visibility after escalation and content sharing notifications.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/communications/calls/options.py
  • class FilePickerOptions 59.7% similar

    A configuration class for SharePoint file picker options that extends ClientValue to specify search settings and organizational asset repositories.

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