Skip to content

Commit

Permalink
chore: update defaults and project metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed Apr 6, 2024
1 parent 8bedf6a commit 5b18f7e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</Promplate/> = <template> // prompt
```

**Promplate** is a prompting framework focusing on developing experience. However, it can also be a super-convenient SDK for simple LLM calls. Promplate progressively enhance your prompting workflow. And it values flexibility as well as perfect conventions. [Learn more](https://promplate.dev/py)
**Promplate** is a prompting framework focusing on developing experience. However, it can also be a super-convenient SDK for simple LLM calls. Promplate progressively enhance your prompting workflow. And it values flexibility as well as perfect conventions. [Try online](https://promplate.dev/py)

## Installation

Expand Down
16 changes: 16 additions & 0 deletions python/promplate/llm/openai/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,19 @@ class SyncChatOpenAI(ClientConfig, LLM):
class AsyncChatOpenAI(AsyncClientConfig, LLM):
complete = AsyncChatComplete.__call__ # type: ignore
generate = AsyncChatGenerate.__call__ # type: ignore


__all__ = (
"TextComplete",
"AsyncTextComplete",
"TextGenerate",
"AsyncTextGenerate",
"ChatComplete",
"AsyncChatComplete",
"ChatGenerate",
"AsyncChatGenerate",
"SyncTextOpenAI",
"AsyncTextOpenAI",
"SyncChatOpenAI",
"AsyncChatOpenAI",
)
2 changes: 1 addition & 1 deletion python/promplate/prompt/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _arender_code(self):
async def arender(self, context: Context) -> str:
return await eval(self._arender_code, context)

def get_script(self, sync=True, indent_str="\t"):
def get_script(self, sync=True, indent_str=" "):
"""compile template string into python script"""
self.compile(sync, indent_str)
return str(self._builder)
Expand Down
6 changes: 3 additions & 3 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tool.poetry]
name = "promplate"
version = "0.3.3.4"
description = "cross-language prompt engineering framework"
version = "0.3.4"
description = "Prompt engineering framework for humans"
homepage = "https://promplate.dev/"
documentation = "https://docs.py.promplate.dev/"
repository = "https://github.com/promplate/core"
authors = ["Muspi Merol <[email protected]>"]
authors = ["Muspi Merol <[email protected]>"]
license = "MIT"
readme = "README.md"
keywords = ["prompt", "template", "nlp", "llm"]
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,6 @@ def test_while_loop():

def test_custom_indent():
template = Template("")
assert "\t" in (a := template.get_script())
assert "\t" in (a := template.get_script(indent_str="\t"))
assert "\t" not in (b := template.get_script(indent_str=" "))
assert a.replace("\t", " ") == b

0 comments on commit 5b18f7e

Please sign in to comment.