Home / v0.29.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2024-08-08 1.6 kB
v0.29.0 source code.tar.gz 2024-08-08 1.6 MB
v0.29.0 source code.zip 2024-08-08 1.6 MB
Totals: 3 Items   3.2 MB 0

What's Changed

This means Message objects can be used anywhere pydantic models can, including in prompt-functions. The new AnyMessage type simplifies this. For example

:::python
from magentic import AnyMessage, prompt

@prompt("Create an example of few-shot prompting for a chatbot")
def make_few_shot_prompt() -> list[AnyMessage]: ...

make_few_shot_prompt()
# [SystemMessage('You are a helpful and knowledgeable assistant.'),
#  UserMessage('What’s the weather like today?'),
#  AssistantMessage[Any]('The weather today is sunny with a high of 75°F (24°C).'),
#  UserMessage('Can you explain the theory of relativity in simple terms?'),
#  AssistantMessage[Any]('Sure! The theory of relativity, developed by Albert Einstein,  ...]

Dependabot * Bump logfire-api from 0.46.1 to 0.49.0 by @dependabot in https://github.com/jackmpcollins/magentic/pull/292 * Bump logfire from 0.46.1 to 0.49.0 by @dependabot in https://github.com/jackmpcollins/magentic/pull/293 * Bump pytest from 8.2.2 to 8.3.2 by @dependabot in https://github.com/jackmpcollins/magentic/pull/286 * Bump openai from 1.35.13 to 1.38.0 by @dependabot in https://github.com/jackmpcollins/magentic/pull/290 * Bump mypy from 1.10.1 to 1.11.1 by @dependabot in https://github.com/jackmpcollins/magentic/pull/291

Full Changelog: https://github.com/jackmpcollins/magentic/compare/v0.28.1...v0.29.0

Source: README.md, updated 2024-08-08