Repository navigation
v0.7.2
What's Changed
- Allow setting max_tokens param by @jackmpcollins in #45
Full Changelog: v0.7.1...v0.7.2
Allow setting max_tokens param in OpenaiChatModel. The default value for this can also be set using an environment variable MAGENTIC_OPENAI_MAX_TOKENS.
Example
from magentic import prompt
from magentic.chat_model.openai_chat_model import OpenaiChatModel
@prompt("Hello, how are you?", model=OpenaiChatModel(max_tokens=3))
def test() -> str:
...
test()
# 'Hello! I'