Skip to content

Commit

Permalink
chore: added openhands for solving some github issues (#1884)
Browse files Browse the repository at this point in the history
Co-authored-by: Jithin James <[email protected]>
  • Loading branch information
jjmachan and Jithin James authored Jan 27, 2025
1 parent 44e2409 commit 501fee7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/openhands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Resolve Issue with OpenHands

on:
issues:
types: [labeled]
pull_request:
types: [labeled]
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
pull_request_review:
types: [submitted]

permissions:
contents: write
pull-requests: write
issues: write

jobs:
call-openhands-resolver:
uses: All-Hands-AI/OpenHands/.github/workflows/openhands-resolver.yml@main
with:
macro: ${{ vars.OPENHANDS_MACRO || '@openhands-agent' }}
max_iterations: ${{ fromJson(vars.OPENHANDS_MAX_ITER || 50) }}
base_container_image: ${{ vars.OPENHANDS_BASE_CONTAINER_IMAGE || '' }}
LLM_MODEL: ${{ vars.LLM_MODEL || 'anthropic/claude-3-5-sonnet-20241022' }}
secrets:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
PAT_USERNAME: ${{ secrets.PAT_USERNAME }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_BASE_URL: ${{ secrets.LLM_BASE_URL }}
4 changes: 3 additions & 1 deletion src/ragas/dataset_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ def validate_samples(self, samples: t.List[Sample]) -> t.List[Sample]:
first_sample_type = type(samples[0])
for i, sample in enumerate(samples):
if not isinstance(sample, first_sample_type):
raise ValueError(f"Sample at index {i} is of type {type(sample)}, expected {first_sample_type}")
raise ValueError(
f"Sample at index {i} is of type {type(sample)}, expected {first_sample_type}"
)

return samples

Expand Down

0 comments on commit 501fee7

Please sign in to comment.