Skip to content

Commit

Permalink
Merge branch 'main' into ai21-ops
Browse files Browse the repository at this point in the history
  • Loading branch information
the-praxs authored Sep 27, 2024
2 parents 6995157 + 69e29f8 commit 33e27fe
Show file tree
Hide file tree
Showing 26 changed files with 208 additions and 141 deletions.
29 changes: 19 additions & 10 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# Contributing Guide
## Open Source and Proprietary Components

Thank you for your interest in contributing to our project!
The AgentOps SDK is open source, but the backend and UI are not. We are source available and also support on-prem/VPC hosting upon request.

## Setting Up the Development Environment
That said, we love when community members contribute to our open source SDK-- we even mail over swag packs to developers who help out :)

Create a virtual environment `python -m venv env` and install requirements `pip install -e .`
## Contribution Guidelines

## Making a Pull Request
We use issues primarily to communicate our thoughts and plans to the community. However, not every issue is suitable for the open-source distribution, as some features may depend on non-open-source parts of our stack.

1. Fork the repository on GitHub.
2. Clone your forked repository to your local machine.
3. Make your changes and commit them to your forked repository.
4. Push your changes to your forked repository on GitHub.
5. Create a new pull request from your forked repository to our original repository.
When looking for issues to work on look for following tags:
- `good first issue`
- `help wanted`

If you have feature requests or bug reports, please open an issue.

## Getting Started

The easiest way to contribute is to start a conversation with us. We highly recommend:

1. Joining our Discord community
2. Sending us a message through our contact form at [agentops.ai/contact](https://agentops.ai/contact)

We look forward to collaborating with you and appreciate your interest in improving AgentOps!
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 🐛 Bug Report
description: Noticed something off with Agentops? Let us know!
title: "[Bug]: "
labels: ["bug"]
assignees: []
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Your feedback helps us improve AgentOps.
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. email@example.com
validations:
required: false
- type: input
id: package-version
attributes:
label: 📦 Package Version
description: What version of Agentops are you using?
placeholder: ex. 0.3.12
validations:
required: true
- type: input
id: framework-version
attributes:
label: 🎞️ Framework Version
description: Which frameworks are you using? (if applicable)
placeholder: ex. Autogen 0.3.0, CrewAI 0.61.0, Langchain 0.2.1
validations:
required: false
- type: textarea
id: bug-description
attributes:
label: 🔎 Describe the Bug
description: Give a clear and concise description of the bug and how to reproduce it. Include any error messages and screenshots.
placeholder: What went wrong?
validations:
required: true
- type: checkboxes
id: contribution
attributes:
label: 🤝 Contribution
description: Would you be willing to contribute to this update?
options:
- label: Yes, I'd be happy to submit a pull request with these changes.
- label: I need some guidance on how to contribute.
- label: I'd prefer the AgentOps team to handle this update.
validations:
required: true
21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/documentation_update.md

This file was deleted.

53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 📚 Documentation Update
description: Suggest an improvement or addition to our documentation
title: "[Docs]: "
labels: ["documentation"]
assignees: []
body:
- type: markdown
attributes:
value: |
Thank you for helping us improve AgentOps documentation! Your input is valuable in making our docs more helpful and comprehensive.
- type: textarea
id: current-state
attributes:
label: 📘 Current State of Documentation
description: What information is missing or could be improved?
placeholder: Describe the current state of the documentation you'd like to update.
validations:
required: true
- type: textarea
id: suggested-improvement
attributes:
label: 📖 Suggested Improvement
description: Describe your idea for the new/improved documentation.
placeholder: What changes or additions would you like to see?
validations:
required: true
- type: input
id: affected-pages
attributes:
label: 🔗 Affected Documentation Pages
description: If applicable, provide links to the documentation pages that need updating.
placeholder: https://docs.agentops.ai/page-to-update
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: 🔍 Additional Context
description: Any extra information to help us understand the change?
placeholder: Provide any additional details or context for the documentation update.
validations:
required: false
- type: checkboxes
id: contribution
attributes:
label: 🤝 Contribution
description: Would you be willing to contribute to this documentation update?
options:
- label: Yes, I'd be happy to submit a pull request with these changes.
- label: I need some guidance on how to contribute.
- label: I'd prefer the Agentops team to handle this update.
validations:
required: true
27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 🚀 Feature Request
description: Got an idea to improve AgentOps? We're all ears!
title: "[Feature]: "
labels: ["enhancement"]
assignees: []
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to share your feature idea! Your input helps us improve AgentOps.
- type: textarea
id: feature-description-and-solution
attributes:
label: 💡 Feature Description and Proposed Solution
description: Briefly describe your feature suggestion and how you envision it working. Include any mockups/screenshots if applicable.
placeholder: What's your brilliant idea?
validations:
required: true
- type: textarea
id: problem-related
attributes:
label: 🤔 Related Problem
description: Is your feature request related to a problem you're facing?
placeholder: Describe the problem, if applicable. The more we understand your struggle, the better we can address it.
validations:
required: false
- type: checkboxes
id: contribution
attributes:
label: 🤝 Contribution
description: Would you be willing to contribute to this update?
options:
- label: Yes, I'd be happy to submit a pull request with these changes.
- label: I need some guidance on how to contribute.
- label: I'd prefer the AgentOps team to handle this update.
validations:
required: true
14 changes: 2 additions & 12 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
## 📥 Pull Request

**📘 Description**
Briefly describe the changes you've made.

**🔄 Related Issue (if applicable)**
If this PR is related to an existing issue, reference it here.

**🎯 Goal**
Explain the intention behind this change.

**🔍 Additional Context**
Any extra information or context to help us understand the change?
_Briefly describe the changes you've made._

**🧪 Testing**
Describe the tests you performed to validate your changes.
_Describe the tests you performed to validate your changes._

Thank you for your contribution to Agentops!
15 changes: 7 additions & 8 deletions agentops/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,14 @@ def format_duration(start_time, end_time):
token_cost_d.quantize(Decimal("0.000001"), rounding=ROUND_HALF_UP)
)
)

analytics = (
f"Analytics for this run - "
f"LLM calls: {self.event_counts['llms']} | "
f"Tool calls: {self.event_counts['tools']} | "
f"Actions: {self.event_counts['actions']} | "
f"Errors: {self.event_counts['errors']} | "
f"Duration: {formatted_duration} | "
f"Cost: ${formatted_cost}"
f"Session stats - "
f"{colored('Cost:', attrs=['bold'])} ${formatted_cost} "
f"{colored('Duration:', attrs=['bold'])} {formatted_duration} "
f"{colored('LLMs:', attrs=['bold'])} {self.event_counts['llms']} "
f"{colored('Tools:', attrs=['bold'])} {self.event_counts['tools']} "
f"{colored('Actions:', attrs=['bold'])} {self.event_counts['actions']} "
f"{colored('Errors:', attrs=['bold'])} {self.event_counts['errors']}"
)
logger.info(analytics)

Expand Down
34 changes: 17 additions & 17 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
"name": "Call my Agent (Support)",
"icon": "headset",
"url": "https://agentops.ai/contact"
},
{
"name": "Give Feedback",
"icon": "comment-smile",
"url": "https://agentops.ai/contact"
}
],
"navigation": [
Expand All @@ -74,18 +79,6 @@
"v1/concepts/tags"
]
},
{
"group": "Usage",
"pages": [
"v1/usage/dashboard-info",
"v1/usage/sdk-reference",
"v1/usage/environment-variables",
"v1/usage/tracking-llm-calls",
"v1/usage/tracking-agents",
"v1/usage/recording-events",
"v1/usage/multiple-sessions"
]
},
{
"group": "Integrations",
"pages": [
Expand All @@ -97,6 +90,18 @@
"v1/integrations/multion"
]
},
{
"group": "Usage",
"pages": [
"v1/usage/dashboard-info",
"v1/usage/sdk-reference",
"v1/usage/advanced-configuration",
"v1/usage/tracking-llm-calls",
"v1/usage/tracking-agents",
"v1/usage/recording-events",
"v1/usage/multiple-sessions"
]
},
{
"group": "Other Info",
"pages": ["v1/concepts/host-env"]
Expand All @@ -112,10 +117,5 @@
"apiKey": "phc_BrY3H11IViWSoUJ0QFfjBx7kEwIJMT0PjBEXZQmddW",
"apiHost": "https://us.i.posthog.com"
}
},
"feedback": {
"thumbsRating": true,
"suggestEdit": true,
"raiseIssue": true
}
}
2 changes: 1 addition & 1 deletion docs/v1/concepts/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The ToolEvent class is for recording calls to tools e.g. searchWeb, fetchFromDB.
| name | str | None | "Parsing Tool" | Name of the tool |
| logs | str or dict | None | "Tool executed successfully" or `{"status": "success"}` | Logs from the tool execution |

The tool event should be created previous to running the tool in order to track the execution time.
The tool event should be created before running the tool in order to track the execution time.

<CodeGroup>
```python python
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/examples/fastapi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ mode: "wide"
API keys are tied to individual projects.<br></br>
A Default Project has been created for you, so just click Copy API Key
</Info>
Set this API Key in your [environment variables](/v1/usage/environment-variables)
Set this API Key in your [environment variables](/v1/usage/advanced-configuration)
```python .env
AGENTOPS_API_KEY=<YOUR API KEY>
```
Expand Down
Loading

0 comments on commit 33e27fe

Please sign in to comment.