-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into wguss/metrics
- Loading branch information
Showing
27 changed files
with
440 additions
and
165 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
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 was deleted.
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
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,15 +1,14 @@ | ||
import ell | ||
# import ell | ||
|
||
|
||
ell.init(verbose=True) | ||
# # ell.init(verbose=True) | ||
|
||
@ell.complex("gpt-4o-audio-preview") | ||
def test(): | ||
return [ell.user("Hey! Could you talk to me in spanish? I'd like to hear how you say 'ell'.")] | ||
# # @ell.complex("gpt-4o-audio-preview") | ||
# # def test(): | ||
# # return [ell.user("Hey! Could you talk to me in spanish? I'd like to hear how you say 'ell'.")] | ||
|
||
response = test() | ||
print(response.audios[0]) | ||
|
||
if __name__ == "__main__": | ||
test() | ||
if __name__ == "__main__": | ||
# # response = test() | ||
# # print(response.audios[0]) | ||
pass | ||
|
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 |
---|---|---|
|
@@ -13,6 +13,9 @@ def cached_chat(history : List[str], new_message : str) -> str: | |
|
||
|
||
|
||
if __name__ == "__main__": | ||
pass | ||
|
||
|
||
|
||
|
||
|
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,22 @@ | ||
import ell | ||
import openai | ||
import os | ||
|
||
ell.init(verbose=True) | ||
|
||
# Models are automatically registered, so we can use them without specifying the client | ||
# set XAI_API_KEY=your_api_key in your environment to run this example | ||
@ell.simple(model='grok-2-mini') | ||
def use_default_xai_client(prompt: str) -> str: | ||
return prompt | ||
|
||
print(use_default_xai_client("Tell me a joke, Grok!")) | ||
|
||
|
||
# If you want to use a custom client you can. | ||
# Custom client for X.AI | ||
xai_client = openai.Client(base_url="https://api.x.ai/v1", api_key=your_api_key) | ||
|
||
@ell.simple(model='grok-2', client=xai_client) | ||
def chat_xai(prompt: str) -> str: | ||
return prompt |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "ell-ai" | ||
version = "0.0.13" | ||
version = "0.0.14" | ||
description = "ell - the language model programming library" | ||
authors = ["William Guss <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -41,6 +41,7 @@ requests = "^2.32.3" | |
typing-extensions = "^4.12.2" | ||
black = "^24.8.0" | ||
pillow = "^10.4.0" | ||
psutil = "^5.9.0" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^8.3.2" | ||
|
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
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
Oops, something went wrong.