Skip to content

Releases: Aleph-Alpha/aleph-alpha-client

2.4.1 - Support Python 3.7

23 Sep 08:33
d866e4c
Compare
Choose a tag to compare

What's Changed

Python support

  • Minimal supported Python version is now 3.7
  • Previously we only supported version 3.8

Full Changelog: v2.4.0...v2.4.1

2.4.0 - Experimental checkpoints

07 Sep 09:01
Compare
Choose a tag to compare

2.4.0

New feature

  • Internal users can now select experimental checkpoints directly instead of a model to process their requests
  • Replaced fields normalize, square_outputs and prompt_explain_indices with directional in experimental explain endpoint

Full Changelog: v2.3.0...v2.4.0

v2.3.0 - Summarization

23 Aug 06:52
5979ff8
Compare
Choose a tag to compare

What's Changed

  • Summarization requests added to the client

Summary with a Docx Document

from aleph_alpha_client import Document, AlephAlphaClient, AlephAlphaModel, SummarizationRequest
import os

model = AlephAlphaModel(
    AlephAlphaClient(host="https://api.aleph-alpha.com", token=os.getenv("AA_TOKEN")),
    # You need to choose a model with qa support for this example.
    model_name = "luminous-extended"
)

docx_file = "./tests/sample.docx"
document = Document.from_docx_file(docx_file)

request = SummarizationRequest(document)

result = model.summarize(request)

print(result)

Summary with a Text

from aleph_alpha_client import AlephAlphaClient, AlephAlphaModel, SummarizationRequest
import os

model = AlephAlphaModel(
    AlephAlphaClient(host="https://api.aleph-alpha.com", token=os.getenv("AA_TOKEN")),
    # You need to choose a model with qa support for this example.
    model_name = "luminous-extended"
)

prompt = "In imperative programming, a computer program is a sequence of instructions in a programming language that a computer can execute or interpret."
document = Document.from_text(prompt)

request = SummarizationRequest(document)

result = model.summarize(request)

print(result)

Summary with a multimodal prompt

from aleph_alpha_client import Document, ImagePrompt, AlephAlphaClient, AlephAlphaModel, SummarizationRequest
import os

model = AlephAlphaModel(
    AlephAlphaClient(host="https://api.aleph-alpha.com", token=os.getenv("AA_TOKEN")),
    # You need to choose a model with qa support for this example.
    model_name = "luminous-extended"
)

url = "https://upload.wikimedia.org/wikipedia/commons/thumb/7/74/2008-09-24_Blockbuster_in_Durham.jpg/330px-2008-09-24_Blockbuster_in_Durham.jpg"
image = ImagePrompt.from_url(url)
prompt = [image]
document = Document.from_prompt(prompt)

request = SummarizationRequest(document)

result = model.summarize(request)

print(result)

Full Changelog: v2.2.3...v2.3.0

2.2.3

15 Aug 12:48
7824722
Compare
Choose a tag to compare

What's Changed

2.2.3

Bugfix:

  • Remove message field from CompletionResult

Full Changelog: v2.2.2...v2.2.3

2.2.2

15 Aug 11:17
5a26a0a
Compare
Choose a tag to compare

What's Changed

2.2.2

  • Document hosting parameter.
  • The hosting parameter determines in which datacenters the request may be processed.
  • Currently, we only support setting it to "aleph-alpha", which allows us to only process the request in our own datacenters.
  • Not setting this value, or setting it to null, allows us to process the request in both our own as well as external datacenters.

Full Changelog: v2.2.1...v2.2.2

2.2.1

11 Aug 09:42
4e04f45
Compare
Choose a tag to compare

What's Changed

Bugfix

  • Restore original error handling of HTTP status codes to before 2.2.0
  • Add dedicated exception BusyError for status code 503

Full Changelog: v2.2.0...v2.2.1

v2.2.0

10 Aug 15:14
af0cb94
Compare
Choose a tag to compare

What's Changed

New feature

  • Retry failed HTTP requests via urllib for status codes 408, 429, 500, 502, 503, 504

Full Changelog: v2.1.0...v2.2.0

2.1.0

10 Aug 11:56
045b6f0
Compare
Choose a tag to compare

What's Changed

New feature

  • Add new parameters to control how repetition penalties are applied for completion requests (see docs for more information):
    • penalty_bias
    • penalty_exceptions
    • penalty_exceptions_include_stop_sequences

Full Changelog: 2.0.0...v2.1.0

2.0.0

08 Aug 12:23
f4a6937
Compare
Choose a tag to compare

What's Changed

Breaking change

  • Make hosting parameter optional in semantic_embed on client. Changed order of parameters hosting and request. Should not be an issue if you're not using semantic_embed from the client directly or if you're using keyword args.

Experimental feature

  • Add experimental penalty parameters for completion

Full Changelog: v1.7.1...2.0.0

v1.7.1 - Improved handling of text-based Documents in Q&A

01 Aug 09:26
40628fd
Compare
Choose a tag to compare

What's Changed

  • Improved handling of text-based Documents in Q&A

Full Changelog: v1.7.0...v1.7.1