-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OPIK-558] Typescript SDK - basic client #919
Merged
Merged
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
0fc1f1f
Initial setup for the TypeScript SDK
ferc 42ccd8b
Add tsup/vitest configs
ferc c9b6d43
Merge branch 'main' of github.com:comet-ml/opik into fernando/typescr…
ferc 9aa5aa2
Merge branch 'main' of github.com:comet-ml/opik into fernando/typescr…
ferc 64ea632
Merge branch 'main' of github.com:comet-ml/opik into fernando/typescr…
ferc fb72a4e
Change code generation to have the original output instead of a compi…
ferc 7cd4cf9
WIP: Adding test suite
ferc 65b632f
Merge branch 'main' of github.com:comet-ml/opik into fernando/typescr…
ferc c533653
Fix first unit tes
ferc 392309a
WIP: Add classes instead of functions
ferc 49c7901
Sync with main
ferc d8dff2f
First draft of client, trace and span classes
ferc 7f5a8a4
Improve types
ferc 3292b3a
Sync with main
ferc 409d2e8
Improve defaults
ferc f0a85b0
Merge branch 'main' of github.com:comet-ml/opik into fernando/typescr…
ferc 086df5c
Fix conflicts
ferc 9858b28
Merge branch 'main' of github.com:comet-ml/opik into fernando/typescr…
ferc 18f3ab1
Add support for CJS
ferc 0fe7965
Add global headers to the configuration (comet-workspace / authorizat…
ferc 5c5f419
Add support for custom environment, workspace and project names
ferc 65831df
Merge branch 'main' of github.com:comet-ml/opik into fernando/typescr…
ferc 8f252c5
Fix conflicts
ferc 7448b1d
Merge branch 'main' of github.com:comet-ml/opik into fernando/typescr…
ferc cab0047
Improve project name management
ferc 5fb5e83
Increment patch version
ferc 747b857
Improve metadata in the package.json
ferc 8653d06
Sync with main and fix conflicts
ferc 02a9ba8
Merge branch 'main' of github.com:comet-ml/opik into fernando/typescr…
ferc 9d3e89f
Sync with main
ferc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Opik } from "opik"; | ||
|
||
const client = new Opik(); | ||
const someTrace = await client.trace({ | ||
name: "test123", | ||
startTime: new Date(), | ||
}); | ||
|
||
const someSpan = await someTrace.span({ | ||
name: "test123 span", | ||
type: "llm", | ||
startTime: new Date(), | ||
}); | ||
|
||
await someSpan.end(); | ||
await someTrace.end(); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to maintain just the
.gitignore
file in the root folder of the repo.