forked from Significant-Gravitas/AutoGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/botirk38/SoloAgent into HEAD
- Loading branch information
Showing
17 changed files
with
321 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
from .models import Code, TestCase | ||
|
||
__all__ = ["Code", "TestCase"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
from typing import Dict | ||
from dataclasses import dataclass, field | ||
|
||
|
||
@dataclass | ||
class Code: | ||
code_files: Dict[str, str] = field(default_factory=dict) | ||
|
||
def __getitem__(self, item: str) -> str: | ||
return self.code_files[item] | ||
|
||
def __setitem__(self, key: str, value: str) -> None: | ||
self.code_files[key] = value | ||
|
||
def items(self): | ||
return self.code_files.items() | ||
|
||
|
||
@dataclass | ||
class TestCase: | ||
test_cases: Dict[str, str] = field(default_factory=dict) | ||
|
||
def __getitem__(self, item: str) -> str: | ||
return self.test_cases[item] | ||
|
||
def __setitem__(self, key: str, value: str) -> None: | ||
self.test_cases[key] = value | ||
|
||
def items(self): | ||
return self.test_cases.items() |
Oops, something went wrong.