Skip to content

Commit 7a42f9b

Browse files
authored
fix: Drop await from LDAIClient factory calls (#33)
1 parent d0b72ca commit 7a42f9b

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

features/create_agent/create_agent_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ async def async_main():
6363
# provider={'name': 'openai'},
6464
# instructions='You are a helpful weather assistant.',
6565
# )
66-
# agent = await aiclient.create_agent(agent_config_key, context, tools={'get_weather': get_weather}, default=default)
67-
agent = await aiclient.create_agent(
66+
# agent = aiclient.create_agent(agent_config_key, context, tools={'get_weather': get_weather}, default=default)
67+
agent = aiclient.create_agent(
6868
agent_config_key,
6969
context,
7070
tools={'get_weather': get_weather},

features/create_agent/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ agent = "create_agent_example:main"
1313
[tool.poetry.dependencies]
1414
python = "^3.10"
1515
python-dotenv = ">=1.0.0"
16-
launchdarkly-server-sdk-ai = ">=0.20.0"
16+
launchdarkly-server-sdk-ai = ">=1.0.0,<2.0.0"
1717
launchdarkly-observability = ">=0.1.0"
1818
launchdarkly-server-sdk-ai-openai = {version = ">=0.5.0", extras = ["agents"]}
1919
launchdarkly-server-sdk-ai-langchain = ">=0.6.0"

features/create_agent_graph/create_agent_graph_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async def async_main():
6363
)
6464

6565
try:
66-
graph = await aiclient.create_agent_graph(
66+
graph = aiclient.create_agent_graph(
6767
graph_key,
6868
context,
6969
tools={

features/create_agent_graph/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ agent-graph = "create_agent_graph_example:main"
1313
[tool.poetry.dependencies]
1414
python = "^3.10"
1515
python-dotenv = ">=1.0.0"
16-
launchdarkly-server-sdk-ai = ">=0.20.0"
16+
launchdarkly-server-sdk-ai = ">=1.0.0,<2.0.0"
1717
launchdarkly-observability = ">=0.1.0"
1818
launchdarkly-server-sdk-ai-openai = {version = ">=0.5.0", extras = ["agents"]}
1919
launchdarkly-server-sdk-ai-langchain = {version = ">=0.6.0", extras = ["graph"]}

features/create_model/create_model_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ async def async_main():
5858
# provider={'name': 'openai'},
5959
# messages=[{'role': 'system', 'content': 'You are a helpful assistant.'}],
6060
# )
61-
# chat = await aiclient.create_model(ai_config_key, context, default, {'companyName': 'LaunchDarkly'})
62-
chat = await aiclient.create_model(ai_config_key, context, variables={
61+
# chat = aiclient.create_model(ai_config_key, context, default, {'companyName': 'LaunchDarkly'})
62+
chat = aiclient.create_model(ai_config_key, context, variables={
6363
'companyName': 'LaunchDarkly',
6464
})
6565

features/create_model/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ model = "create_model_example:main"
1313
[tool.poetry.dependencies]
1414
python = "^3.10"
1515
python-dotenv = ">=1.0.0"
16-
launchdarkly-server-sdk-ai = ">=0.20.0"
16+
launchdarkly-server-sdk-ai = ">=1.0.0,<2.0.0"
1717
launchdarkly-observability = ">=0.1.0"
1818
launchdarkly-server-sdk-ai-openai = ">=0.5.0"
1919
launchdarkly-server-sdk-ai-langchain = ">=0.6.0"

0 commit comments

Comments
 (0)