Skip to content

Commit

Permalink
Sync from internal repo (2025-01-30) (#33)
Browse files Browse the repository at this point in the history
* test(sdk/go): add test for transcription errors (#7199)

GitOrigin-RevId: 749d5058dd66ee32943ac6fb6dfea862922b8b9c

* fix(spec, sdk): remove references of Claude 1 and Basic models (#7201)

GitOrigin-RevId: ad669bfbc9b07a31d10cde02894e2b65010e4403

* fix(sdk): Bump versions for Python, Go, and Typescript (#7981)

GitOrigin-RevId: 0c4b5b870ed3cb099c8f163d0acd839e6d6413a4
  • Loading branch information
marcusolsson authored Jan 30, 2025
1 parent 52add84 commit 464d357
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion assemblyai.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const (
version = "1.9.0"
version = "1.10.0"
defaultBaseURLScheme = "https"
defaultBaseURLHost = "api.assemblyai.com"
)
Expand Down
20 changes: 20 additions & 0 deletions integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,23 @@ func TestIntegration_RealTime_WithExtraSessionInfo(t *testing.T) {

require.True(t, sessionInformationInvoked)
}

// https://github.com/AssemblyAI/assemblyai-go-sdk/issues/32
func TestIntegration_TranscriptionError(t *testing.T) {
apiKey := os.Getenv("ASSEMBLYAI_API_KEY")
if apiKey == "" {
t.Skip("ASSEMBLYAI_API_KEY not set")
}

client := NewClient(apiKey)

ctx := context.Background()

transcript, err := client.Transcripts.TranscribeFromURL(ctx, "https://nonexisting.foo", nil)
// No error, because the transcript is returned with a 200 status code.
require.NoError(t, err)

// Transcription errors are reported in the transcript.Error field.
require.NotNil(t, transcript.Error)
require.NotEmpty(t, ToString(transcript.Error))
}
13 changes: 6 additions & 7 deletions lemur.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,21 @@ const (
// Claude 2.1 is a legacy model similar to Claude 2.0. The key difference is
// that it minimizes model hallucination and system prompts, has a larger
// context window, and performs better in citations.
//
// Deprecated: Switch to Claude 3 by February 6th, 2025.
LeMURModelAnthropicClaude2_1 LeMURModel = "anthropic/claude-2-1"

// Claude 2.0 is a legacy model that has good complex reasoning. It offers
// more nuanced responses and improved contextual comprehension.
//
// Deprecated: Switch to Claude 3 by February 6th, 2025.
LeMURModelAnthropicClaude2 LeMURModel = "anthropic/claude-2"

// Legacy model. The same as [LeMURModelAnthropicClaude2].
//
// Deprecated: Switch to Claude 3 by February 6th, 2025.
LeMURModelDefault LeMURModel = "default"

// Claude Instant is a legacy model that is optimized for speed and cost.
// Claude Instant can complete requests up to 20% faster than Claude 2.0.
LeMURModelAnthropicClaudeInstant1_2 LeMURModel = "anthropic/claude-instant-1-2"

// Legacy model. The same as [LeMURModelAnthropicClaudeInstant1_2].
LeMURModelBasic LeMURModel = "basic"

// Mistral 7B is an open source model that works well for summarization and
// answering questions.
LeMURModelAssemblyAIMistral7B LeMURModel = "assemblyai/mistral-7b"
Expand Down

0 comments on commit 464d357

Please sign in to comment.