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
8 changes: 4 additions & 4 deletions py/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
nox.options.default_venv_backend = 'uv|virtualenv'

PYTHON_VERSIONS = [
#'pypy-3.10', # TODO: Fix build failures.
#'pypy-3.11', # TODO: Fix build failures.
# 'pypy-3.10', # TODO: Fix build failures.
# 'pypy-3.11', # TODO: Fix build failures.
'3.10',
'3.11',
'3.12',
Expand Down Expand Up @@ -51,8 +51,8 @@ def tests(session: nox.Session) -> None:
'--isolated',
'pytest',
'-v',
#'-vv',
#'--log-level=DEBUG',
# '-vv',
# '--log-level=DEBUG',
'.',
*session.posargs,
external=True,
Expand Down
5 changes: 1 addition & 4 deletions py/plugins/xai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ classifiers = [
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"genkit",
"xai-sdk>=0.0.1",
]
dependencies = ["genkit", "xai-sdk>=0.0.1"]
description = "Genkit xAI Plugin"
license = { text = "Apache-2.0" }
name = "genkit-plugin-xai"
Expand Down
12 changes: 6 additions & 6 deletions py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ genkit-plugin-google-cloud = { workspace = true }
genkit-plugin-google-genai = { workspace = true }
genkit-plugin-ollama = { workspace = true }
genkit-plugin-vertex-ai = { workspace = true }
genkit-plugin-xai = { workspace = true }
google-genai-hello = { workspace = true }
google-genai-image = { workspace = true }
prompt-demo = { workspace = true }
genkit-plugin-xai = { workspace = true }

[tool.uv.workspace]
members = ["packages/*", "plugins/*", "samples/*"]
Expand Down Expand Up @@ -277,8 +277,8 @@ unauthorized_licenses = [
]

[tool.liccheck.authorized_packages]
aiohttp = "3.13.2" # Apache-2.0 AND MIT (transitive dep of xai-sdk)
aiohappyeyeballs = "2.6.1" # Python Software Foundation (transitive dep of xai-sdk)
certifi = "2025.4.26" # TODO: Verify.
dependencies = true
ollama = "0.5.1" # MIT "https://github.com/ollama/ollama-python/blob/main/LICENSE"
aiohappyeyeballs = "2.6.1" # Python Software Foundation (transitive dep of xai-sdk)
aiohttp = "3.13.2" # Apache-2.0 AND MIT (transitive dep of xai-sdk)
certifi = "2025.4.26" # TODO: Verify.
dependencies = true
ollama = "0.5.1" # MIT "https://github.com/ollama/ollama-python/blob/main/LICENSE"
27 changes: 14 additions & 13 deletions py/samples/xai-hello/src/xai_hello.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,22 @@ async def calculator_flow(expression: str) -> str:
return f'{operation.title()}({a}, {b}) = {result.get("result")}'


if __name__ == '__main__':
import asyncio
async def main():
result = await say_hi('Alice')
logger.info('say_hi', result=result)

result = await say_hi_stream('Bob')
logger.info('say_hi_stream', result=result[:150])

async def main():
result = await say_hi('Alice')
logger.info('say_hi', result=result)
result = await say_hi_with_config('Charlie')
logger.info('say_hi_with_config', result=result)

result = await say_hi_stream('Bob')
logger.info('say_hi_stream', result=result[:150])
result = await weather_flow('New York')
logger.info('weather_flow', result=result)

result = await say_hi_with_config('Charlie')
logger.info('say_hi_with_config', result=result)
result = await calculator_flow('add_5_3')
logger.info('calculator_flow', result=result)

result = await weather_flow('New York')
logger.info('weather_flow', result=result)

result = await calculator_flow('add_5_3')
logger.info('calculator_flow', result=result)
if __name__ == '__main__':
ai.run_main(main())
4 changes: 3 additions & 1 deletion py/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ skipsdist = True # We install editable, so don't build sdist.

[testenv]
description = Run tests with pytest
allowlist_externals = uv
deps =
pytest
pytest-cov
pytest-asyncio
pytest-mock
PyYAML
-e .
commands_pre =
uv pip install --python {envpython} -e .
commands =
pytest {posargs}
Loading