mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
docs: update example names (#4887)
Use neutral placeholder names and values in a few code examples in the docs and Python docstrings. Text-only; no behavior change. --- _Generated by [Claude Code](https://claude.ai/code/session_019iqZdtD3ZMnvTMeoNsULgX)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
96328f6e08
commit
e2501b0dab
@@ -986,12 +986,12 @@ class DBConnection(EnforceOverrides):
|
||||
Examples
|
||||
--------
|
||||
```python
|
||||
db.create_secret("openai-prod", os.environ["OPENAI_API_KEY"])
|
||||
db.create_secret("model-api-key", os.environ["MODEL_API_KEY"])
|
||||
db.create_function(
|
||||
analyze_caption,
|
||||
secrets=[
|
||||
EnvVarSecret(
|
||||
secret_name="openai-prod", env_variable="OPENAI_API_KEY"
|
||||
secret_name="model-api-key", env_variable="MODEL_API_KEY"
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
@@ -72,7 +72,7 @@ class EnvVarSecret:
|
||||
|
||||
Pass these in the ``secrets`` sequence of
|
||||
[DBConnection.create_function][lancedb.db.DBConnection.create_function]. The
|
||||
Function's source is unchanged by binding: it reads ``OPENAI_API_KEY`` the
|
||||
Function's source is unchanged by binding: it reads ``MODEL_API_KEY`` the
|
||||
way it always did, and the binding is what puts a value there.
|
||||
|
||||
This is a local value. Constructing it contacts no server, so it always
|
||||
@@ -101,10 +101,10 @@ class EnvVarSecret:
|
||||
--------
|
||||
>>> from lancedb import EnvVarSecret
|
||||
>>> binding = EnvVarSecret(
|
||||
... secret_name="openai-prod", env_variable="OPENAI_API_KEY"
|
||||
... secret_name="model-api-key", env_variable="MODEL_API_KEY"
|
||||
... )
|
||||
>>> binding.secret_name, binding.env_variable
|
||||
('openai-prod', 'OPENAI_API_KEY')
|
||||
('model-api-key', 'MODEL_API_KEY')
|
||||
"""
|
||||
|
||||
__slots__ = ("_secret_name", "_env_variable", "_secret_namespace_path")
|
||||
|
||||
Reference in New Issue
Block a user