-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: the core of the framework in place, with a simple example in th…
…e README.md (#1)
- Loading branch information
Showing
17 changed files
with
1,216 additions
and
60 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
openai.key | ||
environment | ||
README.tmp.ipynb | ||
|
||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 @@ | ||
- more examples (with some api call stuff, e.g. to search engines, etc.) | ||
- gifs for the examples | ||
- ability to check number of tokens with tiktoken | ||
- summariser / reducer (e.g. run before making llm call) | ||
- document ways to stop / wait for confirmation before running functions (e.g. when powerful) | ||
- more unit test coverage | ||
- squash / rebase branch before merging into main, then archive | ||
- docs | ||
- functions with no args | ||
- tutorials | ||
|
||
- [x] ability to configure completion, e.g. model etc. |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
from importlib_metadata import version | ||
|
||
__version__ = version(__package__) | ||
|
||
# Expose the main api: | ||
from make_agents.make_agents import Start, draw_graph, llm_func, run_agent # noqa: F401 |
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,21 @@ | ||
import openai | ||
from tenacity import ( | ||
retry, | ||
retry_if_exception_type, | ||
stop_after_attempt, | ||
wait_random_exponential, | ||
) | ||
|
||
|
||
def get_completion(model: str = "gpt-3.5-turbo", **kwargs) -> callable: | ||
@retry( | ||
retry=retry_if_exception_type( | ||
(openai.error.Timeout, openai.error.RateLimitError) | ||
), | ||
wait=wait_random_exponential(min=0, max=60), | ||
stop=stop_after_attempt(6), | ||
) | ||
def completion(**kwargs2): | ||
return openai.ChatCompletion.create(model=model, **kwargs, **kwargs2) | ||
|
||
return completion |
Oops, something went wrong.