Skip to content

Commit

Permalink
feat(js): setup changesets (#6006)
Browse files Browse the repository at this point in the history
* feat(js): publish the client

* add the changeset

* cleanup
  • Loading branch information
mikeldking authored Jan 10, 2025
1 parent 9dacbfd commit 76a9cdf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions js/.changeset/eleven-bananas-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@arizeai/phoenix-client": patch
---

pre-release of phoenix-client
12 changes: 6 additions & 6 deletions js/packages/phoenix-client/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @arizeai/phoenix-client

This package provides a client for the Phoenix API.
This package provides a client for the Phoenix API. It is still under active development and is subject to change.

It utilizes [openapi-ts](https://openapi-ts.pages.dev/) to generate the types from the Phoenix OpenAPI spec.

Expand All @@ -21,11 +21,11 @@ The following environment variables are used:
- `PHOENIX_CLIENT_HEADERS` - Custom headers to add to all requests. A JSON stringified object.

```bash
PHOENIX_HOST=http://localhost:8000 PHOENIX_CLIENT_HEADERS='{"X-Custom-Header": "123"}' pnpx tsx examples/list_datasets.ts
PHOENIX_HOST=http://localhost:6006 PHOENIX_CLIENT_HEADERS='{"Authorization": "bearer xxxxxx"}' pnpx tsx examples/list_datasets.ts
# emits the following request:
# GET http://localhost:8000/v1/datasets
# GET http://localhost:6006/v1/datasets
# headers: {
# "X-Custom-Header": "123",
# "Authorization": "bearer xxxxxx",
# }
```

Expand All @@ -34,9 +34,9 @@ Alternatively, you can pass configuration options to the client directly, and th
```ts
const phoenix = createClient({
options: {
baseUrl: "http://localhost:8000",
baseUrl: "http://localhost:6006",
headers: {
"X-Custom-Header": "123",
Authorization: "bearer xxxxxx",
},
},
});
Expand Down

0 comments on commit 76a9cdf

Please sign in to comment.