repo_id
stringclasses
46 values
file_path
stringlengths
36
118
content
stringlengths
7
1.68M
__index_level_0__
int64
0
0
devchat_public_repos/LabWorkflows/llm_demo
devchat_public_repos/LabWorkflows/llm_demo/chat/command.py
import sys import os home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) from llm_api import ( chat ) @chat(prompt="hello") def ...
0
devchat_public_repos/LabWorkflows/llm_demo
devchat_public_repos/LabWorkflows/llm_demo/chat/command.yml
description: "demo for chat" steps: - run: $devchat_python $command_path/command.py
0
devchat_public_repos/LabWorkflows/llm_demo
devchat_public_repos/LabWorkflows/llm_demo/chat_with_confirm/command.py
import sys import os home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) from llm_api import ( chat, llm_edit_confirm, ) @l...
0
devchat_public_repos/LabWorkflows/llm_demo
devchat_public_repos/LabWorkflows/llm_demo/chat_with_confirm/command.yml
description: "demo for chat confirm" steps: - run: $devchat_python $command_path/command.py
0
devchat_public_repos/LabWorkflows/llm_demo
devchat_public_repos/LabWorkflows/llm_demo/chat_with_memory/command.py
import sys import os home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) from llm_api import ( chat, FixSizeChatMemory ) mem...
0
devchat_public_repos/LabWorkflows/llm_demo
devchat_public_repos/LabWorkflows/llm_demo/chat_with_memory/command.yml
description: "demo for chat with memory" steps: - run: $devchat_python $command_path/command.py
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/weather/weather.py
print('{ "temperature": 22, "unit": "celsius", "description": "Sunny" }')
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/weather/command.yml
description: get the current weather in a given location hint: in $location in degrees $unit parameters: location: type: string description: The city and state, e.g. San Francisco, CA unit: type: string enum: [celsius, fahrenheit] default: celsius steps: - run: $command_python $command_path/w...
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/code_interpreter/runtime.json
{ "sha": "779e4edd862c259c4f292739eeb3671a19c44e9330837bcfba6e509521e0acbe", "command_python": "/Users/admin/.chat/mamba/envs/code_interpreter/bin/python" }
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/code_interpreter/command.py
import sys import os import interpreter import builtins sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "sys", "libs")) sys.path.append(os.path.dirname(__file__)) from chatmark import TextEditor buildin_input = builtins.input has_input = False def ui_text_edit(title, text): print(title, e...
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/code_interpreter/requirements.txt
open-interpreter
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/code_interpreter/command.yml
description: run code interpreter input: optional steps: - run: $command_python $command_path/command.py "$input"
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/code_interpreter/sum.py
import sys a = float(sys.argv[1]) b = float(sys.argv[2]) print('the result is:', a+b)
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/git/git_api.py
import subprocess import requests import time import json # Reuse the GitHub related variables from the context ISSUE_REPO_URL = "https://github.com/devchat-ai/devchat/issues" ISSUE_API_URL = "https://api.github.com/repos/devchat-ai/devchat/issues" GITHUB_ACCESS_TOKEN = "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" GIT...
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/git/command.yml
description: Root of git commands.
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/git/common_util.py
import functools import sys import os # Reuse the paths and imports from the context home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_pa...
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/commit/commit.py
# flake8: noqa: E402 import os import re import subprocess import sys home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) sys.path.app...
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/commit/command.yml
description: 'Writes a well-formatted commit message for selected code changes and commits them via Git. Include an issue number if desired (e.g., input "/commit to close #12").' hint: to close Issue #issue_number input: optional steps: - run: $devchat_python $command_path/commit.py "$input" "english"
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/commit/diffCommitMessagePrompt.txt
Objective:** Generate a commit message that succinctly describes the codebase changes reflected in the provided diff, while incorporating any extra context or guidance from the user. **Commit Message Structure:** 1. **Title Line:** Choose a type such as `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `buil...
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/commit_message_tests.yaml
- vars: commit_message: The commit fixes a use-after-free error in the AFS volume tree due to a race condition between volume lookup and removal. The patch prevents looking up volumes with zero reference count and ensures that once a volume's refcount reaches zero, it is flagged and not looked up ...
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/llm_devchat.py
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "libs")) from llm_api import chat_completion_stream # noqa: E402 messages = [{"role": "user", "content": sys.argv[1]}] llm_config = {"model": "gpt-4-1106-preview"} os.environ["OPENAI_API_KEY"] = os.environ["DEVCHAT_API...
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/commit_cache.json
{"9a6b294ab496650e9f270123730df37030911b55": {"diff": "diff --git a/fs/afs/internal.h b/fs/afs/internal.h\nindex a812952be1c948..7385d62c8cf503 100644\n--- a/fs/afs/internal.h\n+++ b/fs/afs/internal.h\n@@ -586,6 +586,7 @@ struct afs_volume {\n #define AFS_VOLUME_OFFLINE\t4\t/* - T if volume offline notice given */\n #d...
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/commit_message_prompt_config.yaml
prompts: [ '../../diffCommitMessagePrompt.txt' ] providers: - id: "exec:python commit_message_run.py" tests: - commit_message_tests.yaml
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/requirements-test.txt
requests>=2.31.0 openai>=1.6.1 pyyaml>=6.0.1
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/llm_openai.py
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "libs")) from llm_api import chat_completion_stream # noqa: E402 messages = [{"role": "user", "content": sys.argv[1]}] llm_config = {"model": "gpt-4-1106-preview"} response = chat_completion_stream(messages, llm_config...
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/promptfooconfig.yaml
prompts: [ 'write python script: {{topic}}', ] providers: - id: "exec:python llm_openai.py" - id: "exec:python llm_devchat.py" tests: - vars: topic: write python http server
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/run.sh
#!/bin/bash # 获取脚本所在目录 SCRIPT_DIR=$(dirname "$0") TEST_DIR="${SCRIPT_DIR}" REQUIREMENTS_FILE="${TEST_DIR}/requirements-test.txt" CONFIG_FILE="${TEST_DIR}/commit_message_prompt_config.yaml" # 安装Node.js依赖 echo "Installing promptfoo using npx..." npx promptfoo@latest # 检查Python是否安装 if ! command -v python3 &> /dev/null ...
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/readme.md
## Overview This README provides information about the workflow used for generating commit messages based on commit differences. The workflow involves recording prompts, defining test cases, and running scripts to process these cases. ## Dependency Installation Before you can run the tests for commit message genera...
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/gen_cases.py
import requests import yaml import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "libs")) from llm_api import chat_completion_stream # noqa: E402 # 请替换为您的GitHub个人访问令牌 GITHUB_TOKEN = "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" # 设置GitHub API请求头 headers = { "Authorizati...
0
devchat_public_repos/LabWorkflows/git/commit/test
devchat_public_repos/LabWorkflows/git/commit/test/prompt/commit_message_run.py
import json import os import sys import requests def get_script_path(): """Return the directory path of the current script.""" return os.path.dirname(__file__) def update_sys_path(): """Extend system path to include library directories.""" libs_path = os.path.join(get_script_path(), "..", "..", ".....
0
devchat_public_repos/LabWorkflows/git/commit
devchat_public_repos/LabWorkflows/git/commit/zh/command.yml
description: '为你选定的代码变更生成格式规范的提交信息,并通过 Git 提交。如需要可包含对应 issue 编号(例如,输入“/commit to close #12”)' hint: to close Issue #issue_number input: optional steps: - run: $devchat_python $command_path/../commit.py "$input" "chinese"
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/update_pr/command.py
import subprocess import sys import requests import json import os import time home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) sy...
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/update_pr/command.yml
description: 'Create new PR.' input: required steps: - run: $devchat_python $command_path/command.py "$input"
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/new_issue/command.py
import sys import os # Reuse the paths and imports from the context home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) sys.path.appen...
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/new_issue/command.yml
description: 'Create new issue.' input: required steps: - run: $devchat_python $command_path/command.py "$input"
0
devchat_public_repos/LabWorkflows/git/new_issue
devchat_public_repos/LabWorkflows/git/new_issue/from_task/command.py
import sys import os # Reuse the paths and imports from the context home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) sys.path.appen...
0
devchat_public_repos/LabWorkflows/git/new_issue
devchat_public_repos/LabWorkflows/git/new_issue/from_task/command.yml
description: 'Create new issue.' input: required steps: - run: $devchat_python $command_path/command.py "$input"
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/new_branch/command.py
import json import sys import os home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) sys.path.append(os.path.join(os.path.dirname(os....
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/new_branch/command.yml
description: 'Create new branch based current branch, and checkout new branch.' input: required steps: - run: $devchat_python $command_path/command.py "$input"
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/new_pr/command.py
import subprocess import sys import requests import json import os import time home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) sy...
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/new_pr/command.yml
description: 'Create new PR.' steps: - run: $devchat_python $command_path/command.py
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/update_issue_tasks/command.py
import sys import os # Reuse the paths and imports from the context home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) sys.path.appen...
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/update_issue_tasks/command.yml
description: 'Create new issue.' input: required steps: - run: $devchat_python $command_path/command.py "$input"
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/list_issue_tasks/command.py
import sys import os # Reuse the paths and imports from the context home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) sys.path.appen...
0
devchat_public_repos/LabWorkflows/git
devchat_public_repos/LabWorkflows/git/list_issue_tasks/command.yml
description: 'Create new issue.' input: required steps: - run: $devchat_python $command_path/command.py "$input"
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/use_code/command.py
import subprocess import sys import time import requests import json import os home = os.path.expanduser("~") org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs") sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs") sys.path.append(org_libs_path) sys.path.append(sys_libs_path) ...
0
devchat_public_repos/LabWorkflows
devchat_public_repos/LabWorkflows/use_code/command.yml
description: 'Run python code to achieve a goal.' input: required steps: - run: $devchat_python $command_path/command.py "$input"
0