958 shaares
2 private links
2 private links
1 result
tagged
ChatGenerate
#installation-with-pip-install Directly install from https://pypi.org/project/promplate/: pip install promplate[openai] We are using OpenAI just for demonstration. All the code below should run “as is”, which means you can copy and paste them in your terminal and it will work fine. >>> from promplate.llm.openai import ChatComplete # this simply wraps OpenAI's SDK >>> complete = ChatComplete(api_key="...") [...] >>> import time >>> from promplate import Template >>> greet = Template("Greet me. [...] You can initialize a Task with a string like initiating a Template: >>> from promplate import Node >>> greet = Node("Greet me.