|
34 | 34 | "source": [
|
35 | 35 | "await run_eval(use_existing_preds=None, dataset=\"lite\", length=20, repo=\"django/django\", num_workers=10, model=\"claude-3-7-sonnet-latest\")"
|
36 | 36 | ]
|
| 37 | + }, |
| 38 | + { |
| 39 | + "cell_type": "code", |
| 40 | + "execution_count": null, |
| 41 | + "metadata": {}, |
| 42 | + "outputs": [], |
| 43 | + "source": [ |
| 44 | + "from codegen.sdk.core.codebase import Codebase # noqa: E402\n", |
| 45 | + "\n", |
| 46 | + "codebase = Codebase.from_repo(repo_full_name=\"codegen-sh/cloud\")" |
| 47 | + ] |
| 48 | + }, |
| 49 | + { |
| 50 | + "cell_type": "code", |
| 51 | + "execution_count": null, |
| 52 | + "metadata": {}, |
| 53 | + "outputs": [], |
| 54 | + "source": [ |
| 55 | + "# prompt = \"\"\"\n", |
| 56 | + "# Please write integration tests for github tools. Below are paths to relevant files:\n", |
| 57 | + "# Existing integration tests for linear (use these as an example):\n", |
| 58 | + "# - codegen-backend/codegen_integration/test_linear_tools.py\n", |
| 59 | + "# Github Langchain Interface:\n", |
| 60 | + "# - codegen-backend/app/modal_app/gen/github_utils/tools.py\n", |
| 61 | + "# Directory Containing github tools:\n", |
| 62 | + "# - codegen-backend/app/modal_app/gen/tools/github\n", |
| 63 | + "# \"\"\"\n", |
| 64 | + "prompt = \"\"\"\n", |
| 65 | + "Add a notion integration to the codebase. View similar integrations for linear.\n", |
| 66 | + "Please view the existing integrations for linear.\n", |
| 67 | + "- src/codegen/extensions/clients/linear.py\n", |
| 68 | + "\"\"\"" |
| 69 | + ] |
| 70 | + }, |
| 71 | + { |
| 72 | + "cell_type": "code", |
| 73 | + "execution_count": null, |
| 74 | + "metadata": {}, |
| 75 | + "outputs": [], |
| 76 | + "source": [ |
| 77 | + "from codegen.agents.code_agent import CodeAgent\n", |
| 78 | + "\n", |
| 79 | + "agent = CodeAgent(codebase=codebase, tags=[\"local_test\"], model_name=\"claude-3-5-sonnet-latest\", model_provider=\"anthropic\")" |
| 80 | + ] |
| 81 | + }, |
| 82 | + { |
| 83 | + "cell_type": "code", |
| 84 | + "execution_count": null, |
| 85 | + "metadata": {}, |
| 86 | + "outputs": [], |
| 87 | + "source": [ |
| 88 | + "agent.run(prompt)" |
| 89 | + ] |
| 90 | + }, |
| 91 | + { |
| 92 | + "cell_type": "code", |
| 93 | + "execution_count": null, |
| 94 | + "metadata": {}, |
| 95 | + "outputs": [], |
| 96 | + "source": [ |
| 97 | + "codebase.reset()" |
| 98 | + ] |
| 99 | + }, |
| 100 | + { |
| 101 | + "cell_type": "code", |
| 102 | + "execution_count": null, |
| 103 | + "metadata": {}, |
| 104 | + "outputs": [], |
| 105 | + "source": [] |
| 106 | + }, |
| 107 | + { |
| 108 | + "cell_type": "code", |
| 109 | + "execution_count": null, |
| 110 | + "metadata": {}, |
| 111 | + "outputs": [], |
| 112 | + "source": [] |
37 | 113 | }
|
38 | 114 | ],
|
39 | 115 | "metadata": {
|
|
52 | 128 | "name": "python",
|
53 | 129 | "nbconvert_exporter": "python",
|
54 | 130 | "pygments_lexer": "ipython3",
|
55 |
| - "version": "3.13.0" |
| 131 | + "version": "3.13.1" |
56 | 132 | }
|
57 | 133 | },
|
58 | 134 | "nbformat": 4,
|
|
0 commit comments