Skip to content

Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI

Fix notebooks automation (#405)

Howard Gilf6547738190f
diff --git a/.github/workflows/add-markdown-examples-to-docs.yml b/.github/workflows/add-notebook-examples-to-docs.yml
similarity index 78%
rename from .github/workflows/add-markdown-examples-to-docs.yml
rename to .github/workflows/add-notebook-examples-to-docs.yml
index 768a1577..78e76850 100644
--- a/.github/workflows/add-markdown-examples-to-docs.yml
+++ b/.github/workflows/add-notebook-examples-to-docs.yml
@@ -36,7 +36,6 @@ jobs:
echo "Processing file: $file"
source_file=$(grep -oP '(?<=\{/\* SOURCE_FILE: ).*(?= \*/\})' "$file" || true)
if [[ -z "$source_file" ]]; then
- echo "Error: No source file found in $file, skipping..." >&2
continue
fi
echo "Source file: $source_file"
@@ -62,8 +61,20 @@ jobs:
git add docs/v1/examples/*.mdx
git diff --quiet && git diff --staged --quiet || git commit -m "GitHub Action: Update examples in docs from notebooks"
- - name: Push changes
- uses: ad-m/github-push-action@master
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@v5
with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- branch: main
\ No newline at end of file
+ token: ${{ secrets.GITHUB_TOKEN }}
+ commit-message: Update examples in docs from notebooks
+ title: 'Update examples in docs from notebooks'
+ body: |
+ This PR updates the examples in the docs from the corresponding notebooks.
+ Please review the changes before merging.
+ branch: update-docs-examples
+ base: main
+
+# - name: Push changes
+# uses: ad-m/github-push-action@master
+# with:
+# github_token: ${{ secrets.GITHUB_TOKEN }}
+# branch: main
\ No newline at end of file
diff --git a/docs/v1/examples/langchain.mdx b/docs/v1/examples/langchain.mdx
index 5e6c73a4..42b0e09e 100644
--- a/docs/v1/examples/langchain.mdx
+++ b/docs/v1/examples/langchain.mdx
@@ -5,4 +5,4 @@ mode: "wide"
---
_View Notebook on <a href={'https://github.com/AgentOps-AI/agentops/blob/48ae12d4e4e085eed57346f1c40a054097431937/examples/langchain_examples.ipynb'} target={'_blank'}>Github</a>_
-{/* SOURCE_FILE: examples/langchain_examples.ipynb */}
\ No newline at end of file
+{/* SOURCE_FILE: examples/langchain_examples/langchain_examples.ipynb */}
\ No newline at end of file