messages listlengths 2 2 |
|---|
[
{
"role": "user",
"content": "Review this change in Make gpt-engineer pip installable/runnable (gpt_engineer/main.py, Python).\n\n@@ -1,11 +1,12 @@\n import json\n import pathlib\n-\n import typer\n \n-from ai import AI\n-from db import DB, DBs\n-from steps import STEPS\n+from gpt_engineer.chat_to_files imp... |
[
{
"role": "user",
"content": "Review this change in Make gpt-engineer pip installable/runnable (gpt_engineer/main.py, Python).\n\n@@ -34,16 +36,20 @@ def chat(\n \n dbs = DBs(\n memory=DB(memory_path),\n- logs=DB(pathlib.Path(memory_path) / \"logs\"),\n+ logs=DB(memory_path / \"log... |
[
{
"role": "user",
"content": "Review this change in Add steps for unit_tests and specification (gpt_engineer/steps.py, Python).\n\n@@ -50,13 +50,43 @@ def clarify(ai: AI, dbs: DBs):\n return messages\n \n \n+def gen_spec(ai: AI, dbs: DBs):\n+ '''\n+ Generate a spec from the main prompt + clarifica... |
[
{
"role": "user",
"content": "Review this change in improve execution step (gpt_engineer/steps.py, Python).\n\n@@ -119,7 +122,9 @@ def execute_workspace(ai: AI, dbs: DBs):\n return messages\n print('Executing the code...')\n print()\n- subprocess.run(command, shell=True)\n+\n+ # Run th... |
[
{
"role": "user",
"content": "Review this change in Extend tests for DB class (gpt_engineer/db.py, Python).\n\n@@ -11,14 +11,17 @@ def __init__(self, path):\n os.makedirs(self.path, exist_ok=True)\n \n def __getitem__(self, key):\n- with open(self.path / key, encoding='utf-8') as f:\n- ... |
[
{
"role": "user",
"content": "Review this change in Refactored by Sourcery AI (gpt_engineer/ai.py, Python).\n\n@@ -39,7 +39,7 @@ def fassistant(self, msg):\n \n def next(self, messages: list[dict[str, str]], prompt=None):\n if prompt:\n- messages = messages + [{\"role\": \"user\", \"... |
[
{
"role": "user",
"content": "Review this change in Dont require to be in the same folder as the repo to run, v0.0.5 (gpt_engineer/steps.py, Python).\n\n@@ -191,20 +197,20 @@ def use_feedback(ai: AI, dbs: DBs):\n ai.fsystem(setup_sys_prompt(dbs)),\n ai.fuser(f\"Instructions: {dbs.input['main... |
[
{
"role": "user",
"content": "Review this change in Dont require to be in the same folder as the repo to run, v0.0.5 (gpt_engineer/steps.py, Python).\n\n@@ -191,20 +197,20 @@ def use_feedback(ai: AI, dbs: DBs):\n ai.fsystem(setup_sys_prompt(dbs)),\n ai.fuser(f\"Instructions: {dbs.input['main... |
[
{
"role": "user",
"content": "Review this change in Refactoring and suggestions (scripts/benchmark.py, Python).\n\n@@ -59,7 +60,8 @@ def main(\n print(f.read())\n print()\n \n- try:\n+ # surrpess exception"
},
{
"role": "assistant",
"content": "Comment type: nit... |
[
{
"role": "user",
"content": "Review this change in Refactoring and suggestions (scripts/benchmark.py, Python).\n\n@@ -59,7 +60,7 @@ def main(\n print(f.read())\n print()\n \n- try:\n+ with contextlib.suppress(KeyboardInterrupt):"
},
{
"role": "assistant",
"cont... |
[
{
"role": "user",
"content": "Review this change in First step in making gpt-engineer learn. Rename main_prompt -> prompt (scripts/clean_benchmarks.py, Python).\n\n@@ -16,7 +16,7 @@ def main():\n if benchmark.is_dir():\n print(f\"Cleaning {benchmark}\")\n for path in benchmar... |
[
{
"role": "user",
"content": "Review this change in First step in making gpt-engineer learn. Rename main_prompt -> prompt (gpt_engineer/steps.py, Python).\n\n@@ -19,12 +21,24 @@ def setup_sys_prompt(dbs):\n Step = TypeVar(\"Step\", bound=Callable[[AI, DBs], List[dict]])\n \n \n+def get_prompt(dbs):\n+ \"... |
[
{
"role": "user",
"content": "Review this change in Remove `delete_existing` option; Introduce archive (gpt_engineer/db.py, Python).\n\n@@ -47,3 +48,4 @@ class DBs:\n preprompts: DB\n input: DB\n workspace: DB\n+ archive: Optional[DB]"
},
{
"role": "assistant",
"content": "Comment... |
[
{
"role": "user",
"content": "Review this change in Remove `delete_existing` option; Introduce archive (gpt_engineer/main.py, Python).\n\n@@ -35,33 +34,32 @@ def main(\n ):\n logging.basicConfig(level=logging.DEBUG if verbose else logging.INFO)\n \n- input_path = Path(project_path).absolute()\n- m... |
[
{
"role": "user",
"content": "Review this change in Remove `delete_existing` option; Introduce archive (gpt_engineer/steps.py, Python).\n\n@@ -280,15 +295,17 @@ class Config(str, Enum):\n # Different configs of what steps to run\n STEPS = {\n Config.DEFAULT: [\n+ archive,"
},
{
"role": "a... |
[
{
"role": "user",
"content": "Review this change in Implemented logging token usage (solves #322) (gpt_engineer/ai.py, Python).\n\n@@ -50,8 +65,64 @@ def next(self, messages: list[dict[str, str]], prompt=None):\n print()\n messages += [{\"role\": \"assistant\", \"content\": \"\".join(chat)}]... |
[
{
"role": "user",
"content": "Review this change in Implemented logging token usage (solves #322) (gpt_engineer/main.py, Python).\n\n@@ -61,11 +61,12 @@ def main(\n \n steps = STEPS[steps_config]\n for step in steps:\n- messages = step(ai, dbs)\n+ messages = step(ai, dbs, step_name=ste... |
[
{
"role": "user",
"content": "Review this change in Implemented logging token usage (solves #322) (gpt_engineer/steps.py, Python).\n\n@@ -38,21 +38,21 @@ def get_prompt(dbs: DBs) -> str:\n # All steps below have the signature Step\n \n \n-def simple_gen(ai: AI, dbs: DBs) -> List[dict]:\n+def simple_gen(ai: ... |
[
{
"role": "user",
"content": "Review this change in Implemented logging token usage (solves #322) (gpt_engineer/steps.py, Python).\n\n@@ -38,21 +38,21 @@ def get_prompt(dbs: DBs) -> str:\n # All steps below have the signature Step\n \n \n-def simple_gen(ai: AI, dbs: DBs) -> List[dict]:\n+def simple_gen(ai: ... |
[
{
"role": "user",
"content": "Review this change in Implemented logging token usage (solves #322) (gpt_engineer/ai.py, Python).\n\n@@ -31,7 +60,7 @@ def fuser(self, msg):\n def fassistant(self, msg):\n return {\"role\": \"assistant\", \"content\": msg}\n \n- def next(self, messages: List[Dict... |
[
{
"role": "user",
"content": "Review this change in Implemented logging token usage (solves #322) (gpt_engineer/ai.py, Python).\n\n@@ -52,8 +81,65 @@ def next(self, messages: List[Dict[str, str]], prompt=None):\n print()\n messages += [{\"role\": \"assistant\", \"content\": \"\".join(chat)}]... |
[
{
"role": "user",
"content": "Review this change in Add benchmark report (scripts/benchmark.py, Python).\n\n@@ -71,6 +74,75 @@ def main(\n ],\n )\n \n+ generate_report(benchmarks, path)\n+\n+\n+def generate_report(benchmarks, benchmark_path):\n+ headers = [\"Benchmark\", \"... |
[
{
"role": "user",
"content": "Review this change in Add possibility to improve existing codebases (gpt_engineer/chat_to_files.py, Python).\n\n@@ -40,3 +41,26 @@ def to_files(chat, workspace):\n files = parse_chat(chat)\n for file_name, file_content in files:\n workspace[file_name] = file_con... |
[
{
"role": "user",
"content": "Review this change in Add possibility to improve existing codebases (gpt_engineer/chat_to_files.py, Python).\n\n@@ -40,3 +41,26 @@ def to_files(chat, workspace):\n files = parse_chat(chat)\n for file_name, file_content in files:\n workspace[file_name] = file_con... |
[
{
"role": "user",
"content": "Review this change in Add possibility to improve existing codebases (gpt_engineer/chat_to_files.py, Python).\n\n@@ -40,3 +41,26 @@ def to_files(chat, workspace):\n files = parse_chat(chat)\n for file_name, file_content in files:\n workspace[file_name] = file_con... |
[
{
"role": "user",
"content": "Review this change in Add possibility to improve existing codebases (gpt_engineer/main.py, Python).\n\n@@ -36,6 +43,18 @@ def main(\n logging.basicConfig(level=logging.DEBUG if verbose else logging.INFO)\n \n input_path = Path(project_path).absolute()\n+\n+ # For the... |
[
{
"role": "user",
"content": "Review this change in Add possibility to improve existing codebases (gpt_engineer/chat_to_files.py, Python).\n\n@@ -40,3 +43,83 @@ def to_files(chat, workspace):\n files = parse_chat(chat)\n for file_name, file_content in files:\n workspace[file_name] = file_con... |
[
{
"role": "user",
"content": "Review this change in .env setup for OpenAI API key (gpt_engineer/__init__.py, Python).\n\n@@ -0,0 +1,17 @@\n+import os\n+from dotenv import load_dotenv\n+\n+def check_env_vars():\n+ \"\"\"\n+ Check if API KEY env variable exist\n+ If it doesn’t, load from .env file\n+... |
[
{
"role": "user",
"content": "Review this change in .env setup for OpenAI API key (gpt_engineer/main.py, Python).\n\n@@ -26,6 +41,9 @@ def main(\n ):\n logging.basicConfig(level=logging.DEBUG if verbose else logging.INFO)\n \n+ # Call the new function before any actions that require environment varia... |
[
{
"role": "user",
"content": "Review this change in Langchain integration (gpt_engineer/ai.py, Python).\n\n@@ -23,72 +39,134 @@ class TokenUsage:\n \n \n class AI:\n- def __init__(self, model=\"gpt-4\", temperature=0.1):\n+ def __init__(self, model_dir=None, model_name=\"gpt-4\", temperature=0.1):\n ... |
[
{
"role": "user",
"content": "Review this change in Langchain integration (gpt_engineer/ai.py, Python).\n\n@@ -23,72 +39,134 @@ class TokenUsage:\n \n \n class AI:\n- def __init__(self, model=\"gpt-4\", temperature=0.1):\n+ def __init__(self, model_dir=None, model_name=\"gpt-4\", temperature=0.1):\n ... |
[
{
"role": "user",
"content": "Review this change in Langchain integration (gpt_engineer/ai.py, Python).\n\n@@ -152,3 +227,14 @@ def fallback_model(model: str) -> str:\n \"https://openai.com/waitlist/gpt-4-api\\n\"\n )\n return \"gpt-3.5-turbo-16k\"\n+\n+\n+def serialize_messages(... |
[
{
"role": "user",
"content": "Review this change in Langchain integration (gpt_engineer/ai.py, Python).\n\n@@ -23,72 +39,134 @@ class TokenUsage:\n \n \n class AI:\n- def __init__(self, model=\"gpt-4\", temperature=0.1):\n+ def __init__(self, model_dir=None, model_name=\"gpt-4\", temperature=0.1):\n ... |
[
{
"role": "user",
"content": "Review this change in Langchain integration (gpt_engineer/ai.py, Python).\n\n@@ -23,72 +39,134 @@ class TokenUsage:\n \n \n class AI:\n- def __init__(self, model=\"gpt-4\", temperature=0.1):\n+ def __init__(self, model_dir=None, model_name=\"gpt-4\", temperature=0.1):\n ... |
[
{
"role": "user",
"content": "Review this change in Langchain integration (gpt_engineer/steps.py, Python).\n\n@@ -293,7 +297,6 @@ class Config(str, Enum):\n gen_clarified_code,\n gen_entrypoint,\n execute_entrypoint,"
},
{
"role": "assistant",
"content": "Comment type: su... |
[
{
"role": "user",
"content": "Review this change in removed file dictionary, and use full path for files in existing code… (gpt_engineer/chat_to_files.py, Python).\n\n@@ -51,21 +51,12 @@ def overwrite_files(chat, dbs, replace_files):\n \n files = parse_chat(chat)\n for file_name, file_content in fil... |
[
{
"role": "user",
"content": "Review this change in removed file dictionary, and use full path for files in existing code… (gpt_engineer/file_selector.py, Python).\n\n@@ -187,7 +188,8 @@ def ask_for_selection(self) -> List[str]:\n elif re.match(regex, user_input):\n try:\n ... |
[
{
"role": "user",
"content": "Review this change in removed file dictionary, and use full path for files in existing code… (gpt_engineer/file_selector.py, Python).\n\n@@ -196,10 +198,12 @@ def ask_for_selection(self) -> List[str]:\n start = int(start_str)\n en... |
[
{
"role": "user",
"content": "Review this change in Print total api costs (gpt_engineer/ai.py, Python).\n\n@@ -271,6 +271,27 @@ def format_token_usage_log(self) -> str:\n result += str(log.total_tokens) + \"\\n\"\n return result\n \n+ def usage_cost(self) -> float:\n+ \"\"\"\n+... |
[
{
"role": "user",
"content": "Review this change in Load env variable handling & Project preprompt enhancement (gpt_engineer/main.py, Python).\n\n@@ -20,6 +20,9 @@\n def load_env_if_needed():\n if os.getenv(\"OPENAI_API_KEY\") is None:\n load_dotenv()\n+ if os.getenv(\"OPENAI_API_KEY\") is No... |
[
{
"role": "user",
"content": "Review this change in Load env variable handling & Project preprompt enhancement (gpt_engineer/main.py, Python).\n\n@@ -80,13 +89,24 @@ def main(\n project_metadata_path = input_path / \".gpteng\"\n memory_path = project_metadata_path / \"memory\"\n archive_path = p... |
[
{
"role": "user",
"content": "Review this change in Add tests for AI class (gpt_engineer/core/ai.py, Python).\n\n@@ -463,69 +463,63 @@ def num_tokens_from_messages(self, messages: List[Message]) -> int:\n n_tokens += 2 # every reply is primed with <im_start>assistant\n return n_tokens\n \n+... |
[
{
"role": "user",
"content": "Review this change in Fix: Issue 786 - gpt-engineer doesn't respect the COLLECT_LEARNINGS_OPT_OUT=true env variable (gpt_engineer/cli/learning.py, Python).\n\n@@ -146,76 +146,121 @@ def human_review_input() -> Review:\n )\n \n \n-def check_consent() -> bool:\n+# def check_... |
[
{
"role": "user",
"content": "Review this change in update openai (gpt_engineer/core/ai.py, Python).\n\n@@ -18,7 +18,8 @@\n messages_from_dict,\n messages_to_dict,\n )\n-from langchain_community.chat_models import AzureChatOpenAI, ChatOpenAI\n+from langchain_community.chat_models import AzureChatOpe... |
[
{
"role": "user",
"content": "Review this change in feat: added `gpt-engineer.toml` project configuration file (gpt_engineer/core/project_config.py, Python).\n\n@@ -0,0 +1,159 @@\n+\"\"\"\n+Functions for reading and writing the `gpt-engineer.toml` configuration file.\n+\n+The `gpt-engineer.toml` file is a T... |
[
{
"role": "user",
"content": "Review this change in Support for Open LLMs (gpt_engineer/applications/cli/main.py, Python).\n\n@@ -76,8 +76,12 @@ def load_env_if_needed():\n load_dotenv()\n if os.getenv(\"OPENAI_API_KEY\") is None:\n load_dotenv(dotenv_path=os.path.join(os.getcwd(), \".en... |
[
{
"role": "user",
"content": "Review this change in Integrate MBPP benchmarks (gpt_engineer/benchmark/benchmarks/mbpp/load.py, Python).\n\n@@ -0,0 +1,114 @@\n+\"\"\"\n+Module for loading MBPP evaluation tasks.\n+\n+This module provides functionality to load tasks for evaluating GPT-based models\n+on smaller... |
[
{
"role": "user",
"content": "Review this change in Make gpt-engineer pip installable/runnable (gpt_engineer/db.py, Python).\n\n@@ -1,10 +1,11 @@\n-import os\n-\n from dataclasses import dataclass\n+import os\n from pathlib import Path\n \n \n class DB:\n+ \"\"\"A simple key-value store, where keys are f... |
[
{
"role": "user",
"content": "Review this change in Extend tests for DB class (tests/test_db.py, Python).\n\n@@ -1,14 +1,126 @@\n-from gpt_engineer.db import DB\n-\n-\n-def test_db():\n- # use /tmp for testing\n- db = DB(\"/tmp/test_db\")\n- db[\"test\"] = \"test\"\n- assert db[\"test\"] == \"te... |
[
{
"role": "user",
"content": "Review this change in Refactored by Sourcery AI (gpt_engineer/db.py, Python).\n\n@@ -14,11 +14,10 @@ def __init__(self, path):\n def __getitem__(self, key):\n full_path = self.path / key\n \n- if full_path.is_file():\n- with full_path.open(\"r\", ... |
[
{
"role": "user",
"content": "Review this change in Dont require to be in the same folder as the repo to run, v0.0.5 (gpt_engineer/db.py, Python).\n\n@@ -11,6 +11,9 @@ def __init__(self, path):\n \n self.path.mkdir(parents=True, exist_ok=True)\n \n+ def __contains__(self, key):\n+ return (... |
[
{
"role": "user",
"content": "Review this change in First step in making gpt-engineer learn. Rename main_prompt -> prompt (tests/test_collect.py, Python).\n\n@@ -0,0 +1,36 @@\n+import os\n+\n+from unittest.mock import MagicMock\n+\n+import pytest\n+import rudderstack.analytics as rudder_analytics\n+\n+from ... |
[
{
"role": "user",
"content": "Review this change in Remove `delete_existing` option; Introduce archive (tests/steps/test_archive.py, Python).\n\n@@ -0,0 +1,44 @@\n+import datetime\n+import os\n+\n+from unittest.mock import MagicMock\n+\n+from gpt_engineer.db import DB, DBs\n+from gpt_engineer.steps import a... |
[
{
"role": "user",
"content": "Review this change in Add possibility to improve existing codebases (gpt_engineer/file_selector.py, Python).\n\n@@ -0,0 +1,318 @@\n+import os\n+import re\n+import sys\n+import tkinter as tk\n+import tkinter.filedialog as fd\n+\n+from pathlib import Path\n+from typing import Lis... |
[
{
"role": "user",
"content": "Review this change in Langchain integration (gpt_engineer/main.py, Python).\n\n@@ -1,4 +1,3 @@\n-import json\n import logging\n \n from pathlib import Path\n@@ -28,7 +27,7 @@ def main(\n \n model = fallback_model(model)\n ai = AI(\n- model=model,\n+ model_... |
[
{
"role": "user",
"content": "Review this change in removed file dictionary, and use full path for files in existing code… (gpt_engineer/steps.py, Python).\n\n@@ -279,8 +279,9 @@ def improve_existing_code(ai: AI, dbs: DBs):\n A file selection will appear to select the files.\n The terminal will ask ... |
[
{
"role": "user",
"content": "Review this change in Add support for Azure OpenAI Service (gpt_engineer/ai.py, Python).\n\n@@ -10,7 +10,7 @@\n import tiktoken\n \n from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler\n-from langchain.chat_models import ChatOpenAI\n+from langchain.c... |
[
{
"role": "user",
"content": "Review this change in Print total api costs (gpt_engineer/main.py, Python).\n\n@@ -96,6 +96,8 @@ def main(\n messages = step(ai, dbs)\n dbs.logs[step.__name__] = AI.serialize_messages(messages)\n \n+ print(\"Total api cost: $ \", ai.usage_cost())\n+\n if ... |
[
{
"role": "user",
"content": "Review this change in \"Improve\" now edits existing code base (gpt_engineer/core/chat_to_files.py, Python).\n\n@@ -25,15 +25,19 @@\n \"\"\"\n \n import os\n-from pathlib import Path\n import re\n+import logging\n \n+from dataclasses import dataclass\n from typing import List, ... |
[
{
"role": "user",
"content": "Review this change in Selfheal (gpt_engineer/core/steps.py, Python).\n\n@@ -50,6 +50,8 @@\n import subprocess\n \n from enum import Enum\n+from platform import platform\n+from sys import version_info\n from typing import List, Union\n \n from langchain.schema import AIMessage, ... |
[
{
"role": "user",
"content": "Review this change in Remove experimental TDD step configs (tests/test_collect.py, Python).\n\n@@ -8,8 +8,8 @@\n \n from gpt_engineer.collect import collect_learnings, steps_file_hash\n from gpt_engineer.db import DB, DBs\n-from gpt_engineer.learning import extract_learning\n-f... |
[
{
"role": "user",
"content": "Review this change in Project path is now workspace (tests/test_chat_to_files.py, Python).\n\n@@ -1,6 +1,16 @@\n import textwrap\n \n-from gpt_engineer.core.chat_to_files import to_files\n+from gpt_engineer.core.chat_to_files import to_files_and_memory\n+\n+\n+class DummyDBs:\n... |
[
{
"role": "user",
"content": "Review this change in Add tests for AI class (tests/test_ai.py, Python).\n\n@@ -1,9 +1,83 @@\n-import pytest\n-\n from gpt_engineer.core.ai import AI\n+from langchain.chat_models.fake import FakeListChatModel\n+from langchain.chat_models.base import BaseChatModel\n+import copy\... |
[
{
"role": "user",
"content": "Review this change in Fix: Issue 786 - gpt-engineer doesn't respect the COLLECT_LEARNINGS_OPT_OUT=true env variable (tests/test_collection_consent.py, Python).\n\n@@ -0,0 +1,98 @@\n+\"\"\"\n+Tests for the revised data collection consent mechanism in the cli/learning module.\n+... |
[
{
"role": "user",
"content": "Review this change in feat: added `gpt-engineer.toml` project configuration file (tests/test_project_config.py, Python).\n\n@@ -0,0 +1,144 @@\n+import tempfile\n+\n+import pytest\n+\n+from gpt_engineer.core.project_config import (\n+ Config,\n+ _GptEngineerAppConfig,\n+ ... |
[
{
"role": "user",
"content": "Review this change in Support for Open LLMs (docs/examples/open_llms/openai_api_interface.py, Python).\n\n@@ -0,0 +1,21 @@\n+import os\n+\n+from openai import OpenAI\n+\n+client = OpenAI(\n+ base_url=os.getenv(\"OPENAI_API_BASE\"), api_key=os.getenv(\"OPENAI_API_KEY\")\n+)\n... |
[
{
"role": "user",
"content": "Review this change in Integrate MBPP benchmarks (gpt_engineer/benchmark/benchmarks/mbpp/problem.py, Python).\n\n@@ -0,0 +1,25 @@\n+from dataclasses import dataclass\n+from typing import List\n+\n+\n+@dataclass(frozen=True)\n+class Problem:\n+ source_file: int\n+ task_id: ... |
[
{
"role": "user",
"content": "Review this change in Add `useKeyPress` hooks and shortcut in ImportModal (src/containers/ImportModal/index.tsx, TypeScript).\n\n@@ -7,6 +7,7 @@ import { ConfigActionType } from \"src/reducer/reducer\";\n import { Modal, ModalProps } from \"src/components/Modal\";\n import { B... |
[
{
"role": "user",
"content": "Review this change in Add `useKeyPress` hooks and shortcut in ImportModal (src/containers/ImportModal/index.tsx, TypeScript).\n\n@@ -97,6 +98,18 @@ export const ImportModal: React.FC<ModalProps> = ({ visible, setVisible }) => {\n }\n };\n \n+ const handleEspacePress = u... |
[
{
"role": "user",
"content": "Review this change in Add `useKeyPress` hooks and shortcut in ImportModal (src/hooks/useKeyPress.tsx, TypeScript).\n\n@@ -0,0 +1,27 @@\n+import { useState, useEffect } from \"react\";\n+\n+const useKeyPress = (targetKey) => {\n+ const [keyPressed, setKeyPressed] = useState<bo... |
[
{
"role": "user",
"content": "Review this change in Add `useKeyPress` hooks and shortcut in ImportModal (src/components/Modal/index.tsx, TypeScript).\n\n@@ -2,6 +2,7 @@ import React from \"react\";\n import { ReactComponent } from \"src/typings/global\";\n import { Button } from \"src/components/Button\";\... |
[
{
"role": "user",
"content": "Review this change in fix: stick footer to bottom of the page (src/layout/PageLayout/Footer.tsx, TypeScript).\n\n@@ -8,7 +8,7 @@ import { JSONCrackLogo } from \"../JsonCrackLogo\";\n \n export const Footer = () => {\n return (\n- <Container mt={60} px={60} pb=\"xl\" bg=\"b... |
[
{
"role": "user",
"content": "Review this change in ## 🔥 Feature: External API for Audiobook Generation (mlx_audio/tts/generate.py, Python).\n\n@@ -117,5 +117,59 @@ def main():\n traceback.print_exc()\n \n \n+def generate_audio(text: str,"
},
{
"role": "assistant",
"content": "Comment ... |
[
{
"role": "user",
"content": "Review this change in Add verbose logging and model selection support (mlx_audio/server.py, Python).\n\n@@ -75,16 +85,41 @@ def tts_endpoint(\n except ValueError:\n return JSONResponse({\"error\": \"Invalid speed value\"}, status_code=400)\n \n+ # Validate model ... |
[
{
"role": "user",
"content": "Review this change in Play audio segments as they are generated (mlx_audio/tts/generate.py, Python).\n\n@@ -50,6 +50,9 @@ def parse_args():\n def main():\n args = parse_args()\n try:\n+ if args.play:\n+ player = AudioPlayer()"
},
{
"role": "ass... |
[
{
"role": "user",
"content": "Review this change in Play audio segments as they are generated (mlx_audio/tts/generate.py, Python).\n\n@@ -72,8 +75,10 @@ def main():\n \n audio_list = []\n for i, result in enumerate(results):\n- if args.join_audio or args.play:\n+ if arg... |
[
{
"role": "user",
"content": "Review this change in Play audio segments as they are generated (mlx_audio/tts/generate.py, Python).\n\n@@ -93,16 +98,12 @@ def main():\n print(f\"Processing time: {result.processing_time_seconds:.2f}s\")\n print(f\"Peak memory usage: {... |
[
{
"role": "user",
"content": "Review this change in Add (partially-working) voice matching support for Orpheus (mlx_audio/tts/models/llama/llama.py, Python).\n\n@@ -294,31 +317,59 @@ def generate(\n split_pattern: str = \"\\n\",\n max_tokens: int = 1200,\n verbose: bool = False,\n+ ... |
[
{
"role": "user",
"content": "Review this change in Add (partially-working) voice matching support for Orpheus (mlx_audio/tts/models/llama/llama.py, Python).\n\n@@ -294,31 +317,59 @@ def generate(\n split_pattern: str = \"\\n\",\n max_tokens: int = 1200,\n verbose: bool = False,\n+ ... |
[
{
"role": "user",
"content": "Review this change in Add (partially-working) voice matching support for Orpheus (mlx_audio/tts/models/llama/llama.py, Python).\n\n@@ -294,31 +317,59 @@ def generate(\n split_pattern: str = \"\\n\",\n max_tokens: int = 1200,\n verbose: bool = False,\n+ ... |
[
{
"role": "user",
"content": "Review this change in Add (partially-working) voice matching support for Orpheus (mlx_audio/tts/models/llama/llama.py, Python).\n\n@@ -294,31 +317,59 @@ def generate(\n split_pattern: str = \"\\n\",\n max_tokens: int = 1200,\n verbose: bool = False,\n+ ... |
[
{
"role": "user",
"content": "Review this change in Remove all remaining torch calls (mlx_audio/tts/utils.py, Python).\n\n@@ -146,7 +172,7 @@ def load_model(\n ```\n Then use the <local_dir> as the --hf-path in the convert script.\n ```\n-python -m mlx_vlm.convert --hf-path <local_dir> --mlx-path <mlx_dir>\... |
[
{
"role": "user",
"content": "Review this change in Add streaming support for Sesame CSM (mlx_audio/tts/models/sesame/sesame.py, Python).\n\n@@ -464,28 +389,127 @@ def generate(\n duration_hours = int(audio_duration_seconds // 3600)\n duration_str = f\"{duration_hours:02d}:{duration_mins:02d... |
[
{
"role": "user",
"content": "Review this change in More fixes for the Spark BiCodec module (mlx_audio/tts/models/spark/modules/residual.py, Python).\n\n@@ -121,15 +122,18 @@ def vq2emb(self, vq, out_proj=True):\n \n def tokenize(self, z: mx.array) -> mx.array:\n \"\"\"tokenize the input tensor\... |
[
{
"role": "user",
"content": "Review this change in Fix Outetts long generation (mlx_audio/tts/models/outetts/outetts.py, Python).\n\n@@ -83,6 +84,27 @@ def get_speaker(self, voice: Optional[str], ref_audio: Optional[str]) -> dict:\n self.audio_processor.save_speaker(speaker, save_path)\n re... |
[
{
"role": "user",
"content": "Review this change in Add BigVGAN neural audio codec (mlx_audio/codec/models/bigvgan/bigvgan.py, Python).\n\n@@ -0,0 +1,118 @@\n+from dataclasses import dataclass\n+from typing import Literal\n+\n+import mlx.core as mx\n+import mlx.nn as nn\n+\n+from mlx_audio.codec.models.bigv... |
[
{
"role": "user",
"content": "Review this change in Tb/concatenated-output-fix (mlx_audio/tts/generate.py, Python).\n\nimport argparse\nimport os\nimport random\nimport sys\nfrom typing import Generator, Optional, Tuple, Union\n\nimport mlx.core as mx\nimport mlx.nn as nn\nimport numpy as np\nimport soundfi... |
[
{
"role": "user",
"content": "Review this change in fix: update STT transcription parameters and preserve original audio format (mlx_audio/server.py, Python).\n\n@@ -398,11 +398,11 @@ async def stt_transcriptions(\n )\n \n data = await file.read()\n- tmp = io.BytesIO(data)\n- audio, sr = audio... |
[
{
"role": "user",
"content": "Review this change in fix: update STT transcription parameters and preserve original audio format (mlx_audio/server.py, Python).\n\n@@ -401,7 +401,7 @@ async def stt_transcriptions(\n tmp = io.BytesIO(data)\n audio, sr = audio_read(tmp, always_2d=False)\n tmp.close(... |
[
{
"role": "user",
"content": "Review this change in Add (partially-working) voice matching support for Orpheus (mlx_audio/tts/tests/test_models.py, Python).\n\n@@ -524,6 +524,32 @@ def test_generate_fine(self):\n \n \n class TestLlamaModel(unittest.TestCase):\n+ @property\n+ def _default_config(self):... |
[
{
"role": "user",
"content": "Review this change in Add voice matching support for Dia (mlx_audio/tts/models/dia/dia.py, Python).\n\n@@ -4,10 +4,8 @@\n import mlx.core as mx\n import mlx.nn as nn\n import numpy as np\n-import soundfile as sf\n from huggingface_hub import hf_hub_download\n from mlx_lm.sample... |
[
{
"role": "user",
"content": "Review this change in Remove all remaining torch calls (mlx_audio/tts/models/kokoro/voice.py, Python).\n\n@@ -0,0 +1,81 @@\n+import io\n+import pickle\n+import sys\n+import zipfile\n+\n+import numpy as np\n+\n+\n+def load_voice_tensor(path: str) -> np.ndarray:\n+ \"\"\"\n+ ... |
[
{
"role": "user",
"content": "Review this change in Add streaming support for Sesame CSM (mlx_audio/tts/generate.py, Python).\n\n@@ -44,6 +44,8 @@ def generate_audio(\n play: bool = False,\n verbose: bool = True,\n temperature: float = 0.7,\n+ stream: bool = False,\n+ streaming_interval: f... |
[
{
"role": "user",
"content": "Review this change in More fixes for the Spark BiCodec module (mlx_audio/tts/generate.py, Python).\n\n@@ -1,19 +1,29 @@\n import argparse\n import os\n+import random\n import sys\n-from typing import Optional\n+from typing import Optional, Tuple\n \n import mlx.core as mx\n+imp... |
[
{
"role": "user",
"content": "Review this change in Fix Outetts long generation (mlx_audio/tts/generate.py, Python).\n\n@@ -203,6 +203,7 @@ def hertz_to_mel(pitch: float) -> float:\n def generate_audio(\n text: str,\n model_path: str = \"prince-canuma/Kokoro-82M\",\n+ max_tokens: int = 1200,\n ... |
[
{
"role": "user",
"content": "Review this change in Add BigVGAN neural audio codec (mlx_audio/codec/models/bigvgan/resample.py, Python).\n\n@@ -0,0 +1,177 @@\n+import math\n+from typing import Optional\n+\n+import mlx.core as mx\n+import mlx.nn as nn\n+import numpy as np\n+\n+\n+def sinc(x: mx.array):\n+ ... |
[
{
"role": "user",
"content": "Review this change in fix: update STT transcription parameters and preserve original audio format (mlx_audio/ui/app/speech-to-text/page.tsx, TypeScript).\n\n@@ -27,6 +27,7 @@ export default function SpeechToTextPage() {\n const [selectedModel, setSelectedModel] = useState(\"m... |
[
{
"role": "user",
"content": "Review this change in Files with matches (src/search_stream.rs, Rust).\n\n@@ -203,6 +213,9 @@ impl<'a, R: io::Read, W: Terminal + Send> Searcher<'a, R, W> {\n break;\n }\n while self.inp.pos < self.inp.lastnl {\n+ if self.o... |
[
{
"role": "user",
"content": "Review this change in Files with matches (src/search_stream.rs, Rust).\n\n@@ -281,7 +297,7 @@ impl<'a, R: io::Read, W: Terminal + Send> Searcher<'a, R, W> {\n \n #[inline(always)]\n fn print_before_context(&mut self, upto: usize) {\n- if self.opts.count || self.o... |
[
{
"role": "user",
"content": "Review this change in Max depth option (src/args.rs, Rust).\n\n@@ -136,6 +136,9 @@ Less common options:\n -L, --follow\n Follow symlinks.\n \n+ --maxdepth NUM\n+ Descend at most NUM directories below the command line arguments.\n+"
},
{
"role": "as... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.