Skip to content
This repository was archived by the owner on May 10, 2024. It is now read-only.

Commit d71d869

Browse files
committed
docs: Updated JS Client docs with auth config.
Refs: chroma-core/chroma#1026
1 parent bc009cb commit d71d869

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

docs/usage-guide.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -726,13 +726,10 @@ Supported authentication methods:
726726
| Status | `Alpha` |
727727
| Server-Side Support |`Alpha` |
728728
| Client/Python ||
729-
| Client/JS | |
729+
| Client/JS | |
730730

731731
### Basic Authentication
732732

733-
<Tabs queryString groupId="lang" className="hideTabSwitcher">
734-
<TabItem value="py" label="Python">
735-
736733
#### Server Setup
737734

738735
##### Generate Server-Side Credentials
@@ -759,6 +756,9 @@ CHROMA_SERVER_AUTH_PROVIDER='chromadb.auth.basic.BasicAuthServerProvider'
759756
docker-compose --env-file ./.chroma_env up -d --build
760757
```
761758

759+
<Tabs queryString groupId="lang" className="hideTabSwitcher">
760+
<TabItem value="py" label="Python">
761+
762762
#### Client Setup
763763

764764
```python
@@ -777,8 +777,11 @@ client.list_collections() # this is a protected endpoint and requires authentic
777777
</TabItem>
778778
<TabItem value="js" label="JavaScript">
779779

780-
:::info Not Available
781-
Authentication is not yet supported in JS
782-
:::
780+
```js
781+
import { ChromaClient } from 'chromadb'
782+
783+
const client = new ChromaClient({auth: {provider: "basic", credentials: "admin:admin"}});
784+
```
785+
783786
</TabItem>
784787
</Tabs>

0 commit comments

Comments
 (0)