Skip to content

Commit

Permalink
docs: update faq / credentials / migration guide (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas2D authored Jan 18, 2024
1 parent c9cd88f commit abd2d63
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions documentation/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ call our prepared function.

Example can be found :ref:`here <examples.extra.shutdown_handling>`.

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?
---------------------------------
Expand All @@ -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 <examples.extra.service_metadata>`).



When I run multiple text generations simultaneously one is hanging, how to fix that?
------------------------------------------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions documentation/source/v2_migration_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion src/genai/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down

0 comments on commit abd2d63

Please sign in to comment.