Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
0thernet committed Jun 13, 2024
1 parent ab4b9db commit e8a2d23
Show file tree
Hide file tree
Showing 5 changed files with 427 additions and 21 deletions.
7 changes: 4 additions & 3 deletions examples/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
if api_key is None:
raise EnvironmentError("No SUBSTRATE_API_KEY set")

from substrate import Substrate, GenerateText, sb
from substrate import Substrate, GenerateText

substrate = Substrate(api_key=api_key, timeout=60 * 5)

story = GenerateText(prompt="tell me a story")
summary = GenerateText(prompt=sb.concat("Summarize this story: ", story.future.text))
# summary = GenerateText(prompt=sb.concat("Summarize this story: ", story.future.text))

response = substrate.run(story, summary)
# response = substrate.run(story, summary)
response = substrate.run(story)
print(response.api_response.json)
print(response.api_response.status_code)

Expand Down
Loading

0 comments on commit e8a2d23

Please sign in to comment.