Skip to content

prompt_hubs

Class info

Classes

Name Children Inherits
BasePromptHubConfig
llmling_agent.models.prompt_hubs
Configuration for prompt providers.
BraintrustConfig
llmling_agent.models.prompt_hubs
Configuration for Braintrust prompt provider.
    LangfuseConfig
    llmling_agent.models.prompt_hubs
    Configuration for Langfuse prompt provider.
      OpenLITConfig
      llmling_agent.models.prompt_hubs
      Configuration for OpenLIT prompt provider.
        PromptLayerConfig
        llmling_agent.models.prompt_hubs
          TraceloopConfig
          llmling_agent.models.prompt_hubs
          Configuration for Traceloop prompt provider.

            🛈 DocStrings

            Prompt models for agent configuration.

            BasePromptHubConfig

            Bases: BaseModel

            Configuration for prompt providers.

            Source code in src/llmling_agent/models/prompt_hubs.py
            10
            11
            12
            13
            14
            class BasePromptHubConfig(BaseModel):
                """Configuration for prompt providers."""
            
                type: str = Field(init=False)
                model_config = ConfigDict(frozen=True, use_attribute_docstrings=True, extra="forbid")
            

            BraintrustConfig

            Bases: BasePromptHubConfig

            Configuration for Braintrust prompt provider.

            Source code in src/llmling_agent/models/prompt_hubs.py
            73
            74
            75
            76
            77
            78
            79
            80
            81
            82
            83
            class BraintrustConfig(BasePromptHubConfig):
                """Configuration for Braintrust prompt provider."""
            
                type: Literal["braintrust"] = Field("braintrust", init=False)
                """Configuration for Braintrust prompt provider."""
            
                api_key: SecretStr | None = None  # Optional, defaults to BRAINTRUST_API_KEY env var
                """API key for the Braintrust API."""
            
                project: str | None = None
                """Braintrust Project name."""
            

            api_key class-attribute instance-attribute

            api_key: SecretStr | None = None
            

            API key for the Braintrust API.

            project class-attribute instance-attribute

            project: str | None = None
            

            Braintrust Project name.

            type class-attribute instance-attribute

            type: Literal['braintrust'] = Field('braintrust', init=False)
            

            Configuration for Braintrust prompt provider.

            LangfuseConfig

            Bases: BasePromptHubConfig

            Configuration for Langfuse prompt provider.

            Source code in src/llmling_agent/models/prompt_hubs.py
            38
            39
            40
            41
            42
            43
            44
            45
            46
            47
            48
            49
            50
            51
            52
            53
            54
            55
            56
            57
            58
            59
            60
            class LangfuseConfig(BasePromptHubConfig):
                """Configuration for Langfuse prompt provider."""
            
                type: Literal["langfuse"] = Field("langfuse", init=False)
                """Configuration for Langfuse prompt provider."""
            
                secret_key: SecretStr
                """Secret key for the Langfuse API."""
            
                public_key: SecretStr
                """Public key for the Langfuse API."""
            
                host: str = "https://cloud.langfuse.com"
                """Langfuse host address."""
            
                cache_ttl_seconds: int = 60
                """Cache TTL for responses in seconds."""
            
                max_retries: int = 2
                """Maximum number of retries for failed requests."""
            
                fetch_timeout_seconds: int = 20
                """Timeout for fetching responses in seconds."""
            

            cache_ttl_seconds class-attribute instance-attribute

            cache_ttl_seconds: int = 60
            

            Cache TTL for responses in seconds.

            fetch_timeout_seconds class-attribute instance-attribute

            fetch_timeout_seconds: int = 20
            

            Timeout for fetching responses in seconds.

            host class-attribute instance-attribute

            host: str = 'https://cloud.langfuse.com'
            

            Langfuse host address.

            max_retries class-attribute instance-attribute

            max_retries: int = 2
            

            Maximum number of retries for failed requests.

            public_key instance-attribute

            public_key: SecretStr
            

            Public key for the Langfuse API.

            secret_key instance-attribute

            secret_key: SecretStr
            

            Secret key for the Langfuse API.

            type class-attribute instance-attribute

            type: Literal['langfuse'] = Field('langfuse', init=False)
            

            Configuration for Langfuse prompt provider.

            OpenLITConfig

            Bases: BasePromptHubConfig

            Configuration for OpenLIT prompt provider.

            Source code in src/llmling_agent/models/prompt_hubs.py
            25
            26
            27
            28
            29
            30
            31
            32
            33
            34
            35
            class OpenLITConfig(BasePromptHubConfig):
                """Configuration for OpenLIT prompt provider."""
            
                type: Literal["openlit"] = Field("openlit", init=False)
                """Configuration for OpenLIT prompt provider."""
            
                url: str | None = None  # Optional, defaults to OPENLIT_URL env var
                """URL of the OpenLIT API."""
            
                api_key: SecretStr | None = None  # Optional, defaults to OPENLIT_API_KEY env var
                """API key for the OpenLIT API."""
            

            api_key class-attribute instance-attribute

            api_key: SecretStr | None = None
            

            API key for the OpenLIT API.

            type class-attribute instance-attribute

            type: Literal['openlit'] = Field('openlit', init=False)
            

            Configuration for OpenLIT prompt provider.

            url class-attribute instance-attribute

            url: str | None = None
            

            URL of the OpenLIT API.

            PromptLayerConfig

            Bases: BasePromptHubConfig

            Source code in src/llmling_agent/models/prompt_hubs.py
            17
            18
            19
            20
            21
            22
            class PromptLayerConfig(BasePromptHubConfig):
                type: Literal["promptlayer"] = Field("promptlayer", init=False)
                """Configuration for PromptLayer prompt provider."""
            
                api_key: SecretStr
                """API key for the PromptLayer API."""
            

            api_key instance-attribute

            api_key: SecretStr
            

            API key for the PromptLayer API.

            type class-attribute instance-attribute

            type: Literal['promptlayer'] = Field('promptlayer', init=False)
            

            Configuration for PromptLayer prompt provider.

            TraceloopConfig

            Bases: BasePromptHubConfig

            Configuration for Traceloop prompt provider.

            Source code in src/llmling_agent/models/prompt_hubs.py
            63
            64
            65
            66
            67
            68
            69
            70
            class TraceloopConfig(BasePromptHubConfig):
                """Configuration for Traceloop prompt provider."""
            
                type: Literal["traceloop"] = Field("traceloop", init=False)
                """Configuration for Traceloop prompt provider."""
            
                api_key: SecretStr | None = None  # Optional, defaults to TRACELOOP_API_KEY env var
                """API key for the Traceloop API."""
            

            api_key class-attribute instance-attribute

            api_key: SecretStr | None = None
            

            API key for the Traceloop API.

            type class-attribute instance-attribute

            type: Literal['traceloop'] = Field('traceloop', init=False)
            

            Configuration for Traceloop prompt provider.