class BaseGptRequestOptions
BaseGptRequestOptions is a base class that inherits from ClientValue, serving as a foundation for GPT request configuration options in the Office365 library.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/gtp/base_request_options.py
4 - 5
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
-
class ChatGptRequestOptions 72.3% similar
-
class SharePointOneDriveOptions 62.8% similar
-
class CallOptions 61.0% similar
-
class FilePickerOptions 59.7% similar