• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kshard / chatter / 16538940978

26 Jul 2025 10:35AM UTC coverage: 67.584% (+44.9%) from 22.674%
16538940978

Pull #53

github

fogfish
update license
Pull Request #53: Enable multi-content I/O within prompts & responses

596 of 837 new or added lines in 27 files covered. (71.21%)

2 existing lines in 2 files now uncovered.

884 of 1308 relevant lines covered (67.58%)

0.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/provider/bedrock/embedding/titan/types.go
1
//
2
// Copyright (C) 2024 - 2025 Dmitry Kolesnikov
3
//
4
// This file may be modified and distributed under the terms
5
// of the MIT license.  See the LICENSE file for details.
6
// https://github.com/kshard/chatter
7
//
8

9
package titan
10

11
import (
12
        "strings"
13

14
        "github.com/kshard/chatter/aio/provider"
15
        "github.com/kshard/chatter/provider/bedrock"
16
)
17

18
type input struct {
19
        Text       string `json:"inputText"`
20
        Dimensions int    `json:"dimensions,omitempty"`
21
}
22

23
type reply struct {
24
        Vector         []float32 `json:"embedding"`
25
        UsedTextTokens int       `json:"inputTextTokenCount"`
26
}
27

28
type encoder struct {
29
        w   strings.Builder
30
        req input
31
}
32

33
type decoder struct{}
34

35
type Titan = provider.Provider[*input, *reply]
36

NEW
37
func New(model string, opts ...bedrock.Option) (*Titan, error) {
×
NEW
38
        service, err := bedrock.New[*input, *reply](model, opts...)
×
NEW
39
        if err != nil {
×
NEW
40
                return nil, err
×
NEW
41
        }
×
42

NEW
43
        return provider.New(factory, decoder{}, service), nil
×
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc