Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/react-syntax-highlig…
Browse files Browse the repository at this point in the history
…hter-15.6.1
  • Loading branch information
marcklingen authored Nov 27, 2024
2 parents 3fb6b76 + 96c6777 commit 63ece9b
Show file tree
Hide file tree
Showing 204 changed files with 18,040 additions and 8,378 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Specific settings for the .mdx file you want to format as JavaScript
[pages/_app.mdx]
language = javascript
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "CI"

on:
pull_request:
merge_group:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9.5.0
run_install: false

- uses: actions/setup-node@v4
with:
node-version: 20

- run: pnpm install

- name: Build next.js app
# change this if your site requires a custom build command
run: pnpm build
6 changes: 3 additions & 3 deletions .github/workflows/nextjs_bundle_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ jobs:
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: "<!-- __NEXTJS_BUNDLE -->"
body-includes: "<!-- __NEXTJS_BUNDLE"

- name: Create Comment
uses: peter-evans/create-or-update-comment@v2
if: success() && github.event.number && steps.fc.outputs.comment-id == 0
if: success() && github.event.number && steps.get-comment-body.outputs.body != '' && steps.fc.outputs.comment-id == 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}
Expand All @@ -120,6 +120,6 @@ jobs:
if: success() && github.event.number && steps.fc.outputs.comment-id != 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}
body: ${{ steps.get-comment-body.outputs.body || 'Removed' }}
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
94 changes: 94 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ node_modules
# next sitemap
public/robots.txt
public/sitemap*.xml
public/llms.txt

# we use pnpm
package-lock.json
Expand All @@ -24,3 +25,96 @@ litellm_config.yaml
*.ipynb_checkpoints
poetry.lock
.venv

# Created by https://www.toptal.com/developers/gitignore/api/intellij+all
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij+all

### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

.idea/*

!.idea/codeStyles
!.idea/runConfigurations

# End of https://www.toptal.com/developers/gitignore/api/intellij+all
51 changes: 51 additions & 0 deletions components-mdx/datasets-create-dataset-item.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<Tabs items={["Python", "JS/TS", "UI"]}>
<Tab>

```python
langfuse.create_dataset_item(
dataset_name="<dataset_name>",
# any python object or value, optional
input={
"text": "hello world"
},
# any python object or value, optional
expected_output={
"text": "hello world"
},
# metadata, optional
metadata={
"model": "llama3",
}
)
```

_See [low-level SDK](/docs/sdk/python/low-level-sdk) docs for details on how to initialize the Python client._

</Tab>
<Tab>

```ts
langfuse.createDatasetItem({
datasetName: "<dataset_name>",
// any JS object or value
input: {
text: "hello world",
},
// any JS object or value, optional
expectedOutput: {
text: "hello world",
},
// metadata, optional
metadata: {
model: "llama3",
},
});
```

</Tab>
<Tab>

Datasets > Items: `+ New item`

</Tab>
</Tabs>
43 changes: 43 additions & 0 deletions components-mdx/datasets-create-dataset.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<Tabs items={["Python", "JS/TS", "UI"]}>
<Tab>

```python
langfuse.create_dataset(
name="<dataset_name>",
# optional description
description="My first dataset",
# optional metadata
metadata={
"author": "Alice",
"date": "2022-01-01",
"type": "benchmark"
}
)
```

_See [low-level SDK](/docs/sdk/python/low-level-sdk) docs for details on how to initialize the Python client._

</Tab>
<Tab>

```ts
langfuse.createDataset({
name: "<dataset_name>",
// optional description
description: "My first dataset",
// optional metadata
metadata: {
author: "Alice",
date: "2022-01-01",
type: "benchmark",
},
});
```

</Tab>
<Tab>

Datasets: `+ New dataset`

</Tab>
</Tabs>
37 changes: 37 additions & 0 deletions components-mdx/datasets-overview-gif.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { CloudflareVideo } from "@/components/Video";

<Tabs items={["Manage Datasets", "Compare experiments", "Add new items from Langfuse Traces"]}>
<Tab>

Collaboratively manage datasets via UI, API, or SDKs.

<CloudflareVideo
videoId="68748382151bd71f08dcface0649fbc2"
aspectRatio={16 / 9}
gifStyle
/>

</Tab>
<Tab>

Run experiments on datasets. Compare metrics across experiments, and see results side-by-side.

<CloudflareVideo
videoId="f8f2cf7ff86f2b54d1b90c0921d2c7e9"
aspectRatio={16 / 9}
gifStyle
/>

</Tab>
<Tab>

Directly add new items from production traces to datasets to improve your datasets over time.

<CloudflareVideo
videoId="0d71bdd2fc094c5ac4ddebaf44757493"
aspectRatio={16 / 9}
gifStyle
/>

</Tab>
</Tabs>
67 changes: 67 additions & 0 deletions components-mdx/evaluation-overview-gifs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { CloudflareVideo } from "@/components/Video";

<Tabs items={["Analytics", "User Feedback", "LLM-as-a-Judge", "Annotation Queue", "Custom"]}>
<Tab>

Plot evaluation results in the Langfuse Dashboard.

<CloudflareVideo
videoId="3c331720f6c3a90c83cbaaa5d81b29af"
aspectRatio={16 / 9}
gifStyle
/>

</Tab>
<Tab>

Collect feedback from your users. Can be captured in the frontend via our Browser SDK, server-side via the SDKs or API. Video includes example application.

<CloudflareVideo
videoId="e36f0a43d27bf733122d639128677f82"
aspectRatio={16 / 9}
gifStyle
/>

</Tab>
<Tab>

Run fully managed LLM-as-a-judge evaluations on production or development traces. Can be applied to any step within your application for step-wise evaluations.

<CloudflareVideo
videoId="0c3797a6042c29dbcd01e6abbcd3bbe6"
aspectRatio={16 / 9}
gifStyle
/>

</Tab>
<Tab>

Baseline your evaluation workflow with human annotations via Annotation Queues.

<CloudflareVideo
videoId="0154084df3c8ae0de290c60720dd1fb2"
aspectRatio={16 / 9}
gifStyle
/>

</Tab>
<Tab>

Add custom evaluation results, supports numeric, boolean and categorical values.

```bash
POST /api/public/scores
```

Add scores via Python or JS SDK.

```python filename="Example (Python)"
langfuse.score(
trace_id="123",
name="my_custom_evaluator",
value=0.5,
)
```

</Tab>
</Tabs>
17 changes: 17 additions & 0 deletions components-mdx/multi-modal-image-gallery.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Tabs items={["Images", "Audio", "Attachments"]}>
<Tab>
<Frame border className="mt-0">
![Trace in Langfuse UI](/images/docs/multi-modal-trace-image.jpg)
</Frame>
</Tab>
<Tab>
<Frame border className="mt-0">
![Trace in Langfuse UI](/images/docs/multi-modal-trace-audio.png)
</Frame>
</Tab>
<Tab>
<Frame border className="mt-0">
![Trace in Langfuse UI](/images/docs/multi-modal-trace-attachment.png)
</Frame>
</Tab>
</Tabs>
Loading

0 comments on commit 63ece9b

Please sign in to comment.