mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
deepseek api support, dotenv dev fix, other improvements
This commit is contained in:
@@ -3,7 +3,7 @@ from dotenv import load_dotenv
|
||||
from temporalio.client import Client
|
||||
from temporalio.service import TLSConfig
|
||||
|
||||
load_dotenv()
|
||||
load_dotenv(override=True)
|
||||
|
||||
# Temporal connection settings
|
||||
TEMPORAL_ADDRESS = os.getenv("TEMPORAL_ADDRESS", "localhost:7233")
|
||||
@@ -15,6 +15,7 @@ TEMPORAL_TLS_CERT = os.getenv("TEMPORAL_TLS_CERT", "")
|
||||
TEMPORAL_TLS_KEY = os.getenv("TEMPORAL_TLS_KEY", "")
|
||||
TEMPORAL_API_KEY = os.getenv("TEMPORAL_API_KEY", "")
|
||||
|
||||
|
||||
async def get_temporal_client() -> Client:
|
||||
"""
|
||||
Creates a Temporal client based on environment configuration.
|
||||
@@ -47,10 +48,10 @@ async def get_temporal_client() -> Client:
|
||||
api_key=TEMPORAL_API_KEY,
|
||||
tls=True, # Always use TLS with API key
|
||||
)
|
||||
|
||||
|
||||
# Use mTLS or local connection
|
||||
return await Client.connect(
|
||||
TEMPORAL_ADDRESS,
|
||||
namespace=TEMPORAL_NAMESPACE,
|
||||
tls=tls_config,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user