diff --git a/documentation/source/faq.rst b/documentation/source/faq.rst index 6f2c3e38..a51e7e4b 100644 --- a/documentation/source/faq.rst +++ b/documentation/source/faq.rst @@ -17,6 +17,28 @@ call our prepared function. Example can be found :ref:`here `. +Which API Endpoint should I use? +-------------------------------- + +In previous version, you were used to pass the whole URL including it's path and version - this is not true anymore. +See following examples to get it right. + + +.. admonition:: Correct Example + :class: success + + ``https://bam-api.res.ibm.com`` + + +.. admonition:: Wrong Example + :class: error + + ``https://bam-api.res.ibm.com/v1`` (V1 is not supported) + + ``https://bam-api.res.ibm.com/v2`` (V2 is automatically appended) + + ``https://bam-api.res.ibm.com/v2?version=2024-01-01`` (SDK handles API versions internally) + Which endpoints version SDK uses? --------------------------------- @@ -28,6 +50,7 @@ Use the following options to determine which version of a given endpoint SDK use 2. Find it programmatically by retrieving the concrete method's metadata (see :ref:`example `). + When I run multiple text generations simultaneously one is hanging, how to fix that? ------------------------------------------------------------------------------------ diff --git a/documentation/source/v2_migration_guide.rst b/documentation/source/v2_migration_guide.rst index 7db1e31d..cc4cbbfe 100644 --- a/documentation/source/v2_migration_guide.rst +++ b/documentation/source/v2_migration_guide.rst @@ -466,5 +466,7 @@ Extensions Notes - ``PandasExtension`` was removed, because the functionality was replaced by API's prompt templates. +- The ``params`` class attribute has been renamed to `parameters` (everywhere). +- The ``model`` class attribute has been renamed to `model_id` (everywhere). - Third party extensions were updated to work with latest versions of the libraries - If you were using local models through a ``LocalLLMServer``, you may need to adjust them to the new parameter and return types. diff --git a/src/genai/credentials.py b/src/genai/credentials.py index 30565557..a6685d7d 100644 --- a/src/genai/credentials.py +++ b/src/genai/credentials.py @@ -16,7 +16,7 @@ class Credentials(BaseModel): Examples: Create a Credentials instance with explicit api_endpoint:: - credentials = Credentials(api_key="your_api_key", api_endpoint="https://api.example.com") + credentials = Credentials(api_key="your_api_key", api_endpoint="https://bam-api.res.ibm") Create a Credentials instance with default api_endpoint::