mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
parent
590ebb6e47
commit
ad822a31e1
@ -14,7 +14,7 @@ Micro-agents are defined in markdown files under the `openhands/agenthub/codeact
|
|||||||
## Available Micro-Agents
|
## Available Micro-Agents
|
||||||
|
|
||||||
### GitHub Agent
|
### GitHub Agent
|
||||||
**File**: `github.md`
|
**File**: `github.md`
|
||||||
**Triggers**: `github`, `git`
|
**Triggers**: `github`, `git`
|
||||||
|
|
||||||
The GitHub agent specializes in GitHub API interactions and repository management. It:
|
The GitHub agent specializes in GitHub API interactions and repository management. It:
|
||||||
@ -30,7 +30,7 @@ Key features:
|
|||||||
- API-first approach for GitHub operations
|
- API-first approach for GitHub operations
|
||||||
|
|
||||||
### NPM Agent
|
### NPM Agent
|
||||||
**File**: `npm.md`
|
**File**: `npm.md`
|
||||||
**Triggers**: `npm`
|
**Triggers**: `npm`
|
||||||
|
|
||||||
Specializes in handling npm package management with specific focus on:
|
Specializes in handling npm package management with specific focus on:
|
||||||
|
|||||||
@ -90,7 +90,7 @@ When working with a customized repository:
|
|||||||
|
|
||||||
Example customized prompt:
|
Example customized prompt:
|
||||||
```
|
```
|
||||||
Add a new task completion feature to src/components/TaskList.tsx following our existing component patterns.
|
Add a new task completion feature to src/components/TaskList.tsx following our existing component patterns.
|
||||||
Include unit tests in tests/components/ and update the documentation in docs/features/.
|
Include unit tests in tests/components/ and update the documentation in docs/features/.
|
||||||
The component should use our shared styling from src/styles/components.
|
The component should use our shared styling from src/styles/components.
|
||||||
```
|
```
|
||||||
|
|||||||
@ -166,7 +166,9 @@ class CodeActAgent(Agent):
|
|||||||
|
|
||||||
# Add the LLM message (assistant) that initiated the tool calls
|
# Add the LLM message (assistant) that initiated the tool calls
|
||||||
# (overwrites any previous message with the same response_id)
|
# (overwrites any previous message with the same response_id)
|
||||||
logger.debug(f'Tool calls type: {type(assistant_msg.tool_calls)}, value: {assistant_msg.tool_calls}')
|
logger.debug(
|
||||||
|
f'Tool calls type: {type(assistant_msg.tool_calls)}, value: {assistant_msg.tool_calls}'
|
||||||
|
)
|
||||||
pending_tool_call_action_messages[llm_response.id] = Message(
|
pending_tool_call_action_messages[llm_response.id] = Message(
|
||||||
role=assistant_msg.role,
|
role=assistant_msg.role,
|
||||||
# tool call content SHOULD BE a string
|
# tool call content SHOULD BE a string
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
from openhands.core.schema.action import ActionType
|
from openhands.core.schema.action import ActionType
|
||||||
from openhands.core.schema.agent import AgentState
|
from openhands.core.schema.agent import AgentState
|
||||||
from openhands.core.schema.config import ConfigType
|
|
||||||
from openhands.core.schema.observation import ObservationType
|
from openhands.core.schema.observation import ObservationType
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'ActionType',
|
'ActionType',
|
||||||
'ObservationType',
|
'ObservationType',
|
||||||
'ConfigType',
|
|
||||||
'AgentState',
|
'AgentState',
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,49 +0,0 @@
|
|||||||
from enum import Enum
|
|
||||||
|
|
||||||
|
|
||||||
class ConfigType(str, Enum):
|
|
||||||
# For frontend
|
|
||||||
AGENT = 'AGENT'
|
|
||||||
AGENT_MEMORY_ENABLED = 'AGENT_MEMORY_ENABLED'
|
|
||||||
AGENT_MEMORY_MAX_THREADS = 'AGENT_MEMORY_MAX_THREADS'
|
|
||||||
AWS_ACCESS_KEY_ID = 'AWS_ACCESS_KEY_ID'
|
|
||||||
AWS_REGION_NAME = 'AWS_REGION_NAME'
|
|
||||||
AWS_SECRET_ACCESS_KEY = 'AWS_SECRET_ACCESS_KEY'
|
|
||||||
BASE_CONTAINER_IMAGE = 'BASE_CONTAINER_IMAGE'
|
|
||||||
CACHE_DIR = 'CACHE_DIR'
|
|
||||||
CONFIRMATION_MODE = 'CONFIRMATION_MODE'
|
|
||||||
DEBUG = 'DEBUG'
|
|
||||||
DISABLE_COLOR = 'DISABLE_COLOR'
|
|
||||||
E2B_API_KEY = 'E2B_API_KEY'
|
|
||||||
FILE_UPLOADS_ALLOWED_EXTENSIONS = 'FILE_UPLOADS_ALLOWED_EXTENSIONS'
|
|
||||||
FILE_UPLOADS_MAX_FILE_SIZE_MB = 'FILE_UPLOADS_MAX_FILE_SIZE_MB'
|
|
||||||
FILE_UPLOADS_RESTRICT_FILE_TYPES = 'FILE_UPLOADS_RESTRICT_FILE_TYPES'
|
|
||||||
LLM_API_KEY = 'LLM_API_KEY'
|
|
||||||
LLM_API_VERSION = 'LLM_API_VERSION'
|
|
||||||
LLM_BASE_URL = 'LLM_BASE_URL'
|
|
||||||
LLM_CACHING_PROMPT = 'LLM_CACHING_PROMPT'
|
|
||||||
LLM_CUSTOM_LLM_PROVIDER = 'LLM_CUSTOM_LLM_PROVIDER'
|
|
||||||
LLM_DROP_PARAMS = 'LLM_DROP_PARAMS'
|
|
||||||
LLM_EMBEDDING_BASE_URL = 'LLM_EMBEDDING_BASE_URL'
|
|
||||||
LLM_EMBEDDING_DEPLOYMENT_NAME = 'LLM_EMBEDDING_DEPLOYMENT_NAME'
|
|
||||||
LLM_EMBEDDING_MODEL = 'LLM_EMBEDDING_MODEL'
|
|
||||||
LLM_MAX_INPUT_TOKENS = 'LLM_MAX_INPUT_TOKENS'
|
|
||||||
LLM_MAX_OUTPUT_TOKENS = 'LLM_MAX_OUTPUT_TOKENS'
|
|
||||||
LLM_MODEL = 'LLM_MODEL'
|
|
||||||
LLM_NUM_RETRIES = 'LLM_NUM_RETRIES'
|
|
||||||
LLM_RETRY_MAX_WAIT = 'LLM_RETRY_MAX_WAIT'
|
|
||||||
LLM_RETRY_MIN_WAIT = 'LLM_RETRY_MIN_WAIT'
|
|
||||||
LLM_TEMPERATURE = 'LLM_TEMPERATURE'
|
|
||||||
LLM_TIMEOUT = 'LLM_TIMEOUT'
|
|
||||||
LLM_TOP_P = 'LLM_TOP_P'
|
|
||||||
LLM_DISABLE_VISION = 'LLM_DISABLE_VISION'
|
|
||||||
MAX_ITERATIONS = 'MAX_ITERATIONS'
|
|
||||||
RUN_AS_OPENHANDS = 'RUN_AS_OPENHANDS'
|
|
||||||
SANDBOX_TIMEOUT = 'SANDBOX_TIMEOUT'
|
|
||||||
SANDBOX_USER_ID = 'SANDBOX_USER_ID'
|
|
||||||
SECURITY_ANALYZER = 'SECURITY_ANALYZER'
|
|
||||||
USE_HOST_NETWORK = 'USE_HOST_NETWORK'
|
|
||||||
WORKSPACE_BASE = 'WORKSPACE_BASE'
|
|
||||||
WORKSPACE_MOUNT_PATH = 'WORKSPACE_MOUNT_PATH'
|
|
||||||
WORKSPACE_MOUNT_PATH_IN_SANDBOX = 'WORKSPACE_MOUNT_PATH_IN_SANDBOX'
|
|
||||||
WORKSPACE_MOUNT_REWRITE = 'WORKSPACE_MOUNT_REWRITE'
|
|
||||||
Loading…
x
Reference in New Issue
Block a user