Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""ByteDance provider."""
"""ByteDance provider for image generation."""

from .client import ByteDanceImageGenerationClient
from .models import MODELS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""ByteDance client implementation."""
"""ByteDance client implementation for image generation."""

import base64
from collections.abc import AsyncIterator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""ByteDance provider configuration."""
"""ByteDance provider configuration for image generation."""

# HTTP Configuration
BASE_URL = "https://ark.ap-southeast.bytepluses.com/api/v3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""ByteDance models."""
"""ByteDance models for image generation."""

from celeste import Model, Provider
from celeste.constraints import Bool, Choice
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""ByteDance parameter mappers."""
"""ByteDance parameter mappers for image generation."""

from typing import Any

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google provider."""
"""Google provider for image generation."""

from .client import GoogleImageGenerationClient
from .models import MODELS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google client implementation."""
"""Google client implementation for image generation."""

import base64
from typing import Any, Unpack
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google provider configuration."""
"""Google provider configuration for image generation."""

# HTTP Configuration
BASE_URL = "https://generativelanguage.googleapis.com/v1beta/models"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google models."""
"""Google models for image generation."""

from celeste import Model, Provider
from celeste.constraints import Choice
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google parameter mappers."""
"""Google parameter mappers for image generation."""

from typing import Any

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI provider."""
"""OpenAI provider for image generation."""

from .client import OpenAIImageGenerationClient
from .models import MODELS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI client implementation."""
"""OpenAI client implementation for image generation."""

import base64
from collections.abc import AsyncIterator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI provider configuration."""
"""OpenAI provider configuration for image generation."""

# HTTP Configuration
BASE_URL = "https://api.openai.com"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI models."""
"""OpenAI models for image generation."""

from celeste import Model, Provider
from celeste.constraints import Choice, Range
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI parameter mappers."""
"""OpenAI parameter mappers for image generation."""

from typing import Any

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Anthropic provider."""
"""Anthropic provider for text generation."""

from .client import AnthropicTextGenerationClient
from .models import MODELS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Anthropic client implementation."""
"""Anthropic client implementation for text generation."""

from collections.abc import AsyncIterator
from typing import Any, Unpack
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Anthropic provider configuration."""
"""Anthropic provider configuration for text generation."""

# HTTP Configuration
BASE_URL = "https://api.anthropic.com"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Anthropic models."""
"""Anthropic models for text generation."""

from celeste import Model, Provider
from celeste.constraints import Range, Schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Anthropic parameter mappers."""
"""Anthropic parameter mappers for text generation."""

import json
from typing import Any, get_args, get_origin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Cohere provider."""
"""Cohere provider for text generation."""

from .client import CohereTextGenerationClient
from .models import MODELS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Cohere client implementation."""
"""Cohere client implementation for text generation."""

from collections.abc import AsyncIterator
from typing import Any, Unpack
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Cohere provider configuration."""
"""Cohere provider configuration for text generation."""

# HTTP Configuration
BASE_URL = "https://api.cohere.com"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Cohere models."""
"""Cohere models for text generation."""

from celeste import Model, Provider
from celeste.constraints import Range, Schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Cohere parameter mappers."""
"""Cohere parameter mappers for text generation."""

import json
from typing import Any, get_args, get_origin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google provider."""
"""Google provider for text generation."""

from .client import GoogleTextGenerationClient
from .models import MODELS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google client implementation."""
"""Google client implementation for text generation."""

from collections.abc import AsyncIterator
from typing import Any, Unpack
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google provider configuration."""
"""Google provider configuration for text generation."""

# HTTP Configuration
BASE_URL = "https://generativelanguage.googleapis.com"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google models."""
"""Google models for text generation."""

from celeste import Model, Provider
from celeste.constraints import Range, Schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google parameter mappers."""
"""Google parameter mappers for text generation."""

from typing import Any, get_args, get_origin

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Mistral provider."""
"""Mistral provider for text generation."""

from .client import MistralTextGenerationClient
from .models import MODELS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Mistral client implementation."""
"""Mistral client implementation for text generation."""

from collections.abc import AsyncIterator
from typing import Any, Unpack
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Mistral provider configuration."""
"""Mistral provider configuration for text generation."""

# HTTP Configuration
BASE_URL = "https://api.mistral.ai"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Mistral models."""
"""Mistral models for text generation."""

from celeste import Model, Provider
from celeste.constraints import Range, Schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Mistral parameter mappers."""
"""Mistral parameter mappers for text generation."""

from typing import Any, get_args, get_origin

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI provider."""
"""OpenAI provider for text generation."""

from .client import OpenAITextGenerationClient
from .models import MODELS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI client implementation."""
"""OpenAI client implementation for text generation."""

from collections.abc import AsyncIterator
from typing import Any, Unpack
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI provider configuration."""
"""OpenAI provider configuration for text generation."""

# HTTP Configuration
BASE_URL = "https://api.openai.com"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI models."""
"""OpenAI models for text generation."""

from celeste import Model, Provider
from celeste.constraints import Choice, Range, Schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI parameter mappers."""
"""OpenAI parameter mappers for text generation."""

import json
from typing import Any, get_args, get_origin
Expand Down
13 changes: 10 additions & 3 deletions packages/video-generation/src/celeste_video_generation/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from celeste.artifacts import VideoArtifact
from celeste.client import Client
from celeste.exceptions import ValidationError
from celeste_video_generation.io import (
VideoGenerationInput,
VideoGenerationOutput,
Expand Down Expand Up @@ -37,11 +38,17 @@ def _parse_content(
"""Parse content from provider response."""

def _create_inputs(
self,
prompt: str,
**parameters: Unpack[VideoGenerationParameters],
self, *args: str, **parameters: Unpack[VideoGenerationParameters]
) -> VideoGenerationInput:
"""Map positional arguments to Input type."""
if args:
return VideoGenerationInput(prompt=args[0])
prompt: str | None = parameters.get("prompt")
if prompt is None:
msg = (
"prompt is required (either as positional argument or keyword argument)"
)
raise ValidationError(msg)
return VideoGenerationInput(prompt=prompt)

@classmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""ByteDance provider configuration."""
"""ByteDance provider configuration for video generation."""

# HTTP Configuration
BASE_URL = "https://ark.ap-southeast.bytepluses.com/api/v3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""ByteDance parameter mappers."""
"""ByteDance parameter mappers for video generation."""

from typing import Any

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google provider configuration."""
"""Google provider configuration for video generation."""

BASE_URL = "https://generativelanguage.googleapis.com/v1beta"
GENERATE_ENDPOINT = "/models/{model_id}:predictLongRunning"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google models."""
"""Google models for video generation."""

from celeste import Model, Provider
from celeste.constraints import Choice, ImageConstraint, ImagesConstraint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Google parameter mappers."""
"""Google parameter mappers for video generation."""

from typing import Any

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI client implementation."""
"""OpenAI client implementation for video generation."""

import asyncio
import base64
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI provider configuration."""
"""OpenAI provider configuration for video generation."""

# HTTP Configuration
BASE_URL = "https://api.openai.com"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI models."""
"""OpenAI models for video generation."""

from celeste import Model, Provider
from celeste.constraints import Choice, ImageConstraint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OpenAI parameter mappers."""
"""OpenAI parameter mappers for video generation."""

from typing import Any

Expand Down
Loading