File size: 1,289 Bytes
08b30b7
 
 
 
 
 
 
 
 
 
 
 
e695a2f
 
 
 
 
 
 
 
 
08b30b7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""

Compatibility shim for HTTPEnvClient when openenv-core package doesn't have it.



This file provides HTTPEnvClient as a workaround until the openenv-core package

is updated with the http_env_client module.

"""

try:
    # Try to import from openenv_core (should work once package is updated)
    from openenv_core.http_env_client import HTTPEnvClient
except ImportError:
    # Fallback: create HTTPEnvClient from EnvClient
    # Try openenv.core first (correct package structure)
    try:
        from openenv.core.env_client import EnvClient
        from openenv.core.env_server.types import State
    except ImportError:
        # Fallback to openenv_core (legacy compatibility)
        from openenv_core.env_client import EnvClient
        from openenv_core.env_server.types import State
    
    from typing import Generic, TypeVar

    ActT = TypeVar("ActT")
    ObsT = TypeVar("ObsT")

    class HTTPEnvClient(EnvClient[ActT, ObsT, State], Generic[ActT, ObsT]):
        """

        HTTP Environment Client compatibility shim.

        

        This is a wrapper around EnvClient that uses the standard State type

        and only requires 2 type parameters (action and observation types).

        """
        pass

__all__ = ["HTTPEnvClient"]