beamlit 0.0.20rc6__tar.gz → 0.0.20rc7__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (301) hide show
  1. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/PKG-INFO +7 -5
  2. beamlit-0.0.20rc7/beamlit.yaml +5 -0
  3. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/pyproject.toml +8 -6
  4. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/agents/chat.py +2 -2
  5. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/agents/decorator.py +35 -17
  6. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/authentication/authentication.py +9 -7
  7. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/authentication/credentials.py +12 -6
  8. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/common/generate.py +6 -6
  9. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/common/settings.py +56 -26
  10. beamlit-0.0.20rc7/src/beamlit/serve/app.py +73 -0
  11. beamlit-0.0.20rc7/src/beamlit/serve/middlewares/__init__.py +4 -0
  12. beamlit-0.0.20rc7/src/beamlit/serve/middlewares/accesslog.py +14 -0
  13. beamlit-0.0.20rc7/src/beamlit/serve/middlewares/processtime.py +12 -0
  14. beamlit-0.0.20rc7/src/integrationtest/agent.py +39 -0
  15. beamlit-0.0.20rc7/src/integrationtest/functions/helloworld.py +7 -0
  16. {beamlit-0.0.20rc6/src → beamlit-0.0.20rc7/src/integrationtest}/main.py +2 -2
  17. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/uv.lock +607 -7
  18. beamlit-0.0.20rc6/beamlit.yaml +0 -3
  19. beamlit-0.0.20rc6/src/beamlit/serve.py +0 -120
  20. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/.gitignore +0 -0
  21. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/README.md +0 -0
  22. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/__init__.py +0 -0
  23. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/agents/__init__.py +0 -0
  24. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/__init__.py +0 -0
  25. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/__init__.py +0 -0
  26. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/create_agent.py +0 -0
  27. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/create_agent_release.py +0 -0
  28. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/delete_agent.py +0 -0
  29. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/delete_agent_deployment.py +0 -0
  30. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/delete_agent_deployment_history.py +0 -0
  31. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/delete_agent_history.py +0 -0
  32. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/get_agent.py +0 -0
  33. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/get_agent_deployment.py +0 -0
  34. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/get_agent_deployment_history.py +0 -0
  35. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/get_agent_deployment_logs.py +0 -0
  36. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/get_agent_deployment_metrics.py +0 -0
  37. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/get_agent_environment_logs.py +0 -0
  38. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/get_agent_history.py +0 -0
  39. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/get_agent_metrics.py +0 -0
  40. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/list_agent_deployment_history.py +0 -0
  41. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/list_agent_deployments.py +0 -0
  42. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/list_agent_history.py +0 -0
  43. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/list_agents.py +0 -0
  44. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/put_agent_deployment.py +0 -0
  45. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/put_agent_deployment_history.py +0 -0
  46. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/put_agent_history.py +0 -0
  47. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/agents/update_agent.py +0 -0
  48. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/configurations/__init__.py +0 -0
  49. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/configurations/get_configuration.py +0 -0
  50. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/environments/__init__.py +0 -0
  51. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/environments/create_environment.py +0 -0
  52. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/environments/delete_environment.py +0 -0
  53. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/environments/get_environment.py +0 -0
  54. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/environments/get_environment_metrics.py +0 -0
  55. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/environments/list_environments.py +0 -0
  56. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/environments/update_environment.py +0 -0
  57. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/__init__.py +0 -0
  58. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/create_function.py +0 -0
  59. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/create_function_release.py +0 -0
  60. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/delete_function.py +0 -0
  61. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/delete_function_deployment.py +0 -0
  62. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/get_function.py +0 -0
  63. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/get_function_deployment.py +0 -0
  64. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/get_function_deployment_logs.py +0 -0
  65. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/get_function_deployment_metrics.py +0 -0
  66. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/get_function_environment_logs.py +0 -0
  67. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/get_function_metrics.py +0 -0
  68. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/list_function_deployments.py +0 -0
  69. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/list_functions.py +0 -0
  70. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/put_function_deployment.py +0 -0
  71. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/functions/update_function.py +0 -0
  72. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/history/__init__.py +0 -0
  73. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/history/get_agents_history.py +0 -0
  74. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/history/list_agents_history.py +0 -0
  75. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/__init__.py +0 -0
  76. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/create_integration_connection.py +0 -0
  77. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/delete_integration_connection.py +0 -0
  78. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/get_integration.py +0 -0
  79. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/get_integration_connection.py +0 -0
  80. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/get_integration_connection_model.py +0 -0
  81. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/get_integration_model.py +0 -0
  82. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/list_integration_connection_models.py +0 -0
  83. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/list_integration_connections.py +0 -0
  84. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/list_integration_models.py +0 -0
  85. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/integrations/update_integration_connection.py +0 -0
  86. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/invitations/__init__.py +0 -0
  87. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/invitations/list_all_pending_invitations.py +0 -0
  88. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/locations/__init__.py +0 -0
  89. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/locations/list_locations.py +0 -0
  90. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/metrics/__init__.py +0 -0
  91. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/metrics/get_metrics.py +0 -0
  92. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/model_providers/__init__.py +0 -0
  93. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/model_providers/create_model_provider.py +0 -0
  94. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/model_providers/delete_model_provider.py +0 -0
  95. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/model_providers/get_model_provider.py +0 -0
  96. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/model_providers/list_model_providers.py +0 -0
  97. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/model_providers/update_model_provider.py +0 -0
  98. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/__init__.py +0 -0
  99. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/create_model.py +0 -0
  100. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/delete_model.py +0 -0
  101. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/delete_model_deployment.py +0 -0
  102. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/get_model.py +0 -0
  103. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/get_model_deployment.py +0 -0
  104. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/get_model_deployment_logs.py +0 -0
  105. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/get_model_deployment_metrics.py +0 -0
  106. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/get_model_environment_logs.py +0 -0
  107. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/get_model_metrics.py +0 -0
  108. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/list_model_deployments.py +0 -0
  109. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/list_models.py +0 -0
  110. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/put_model_deployment.py +0 -0
  111. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/release_model.py +0 -0
  112. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/models/update_model.py +0 -0
  113. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/policies/__init__.py +0 -0
  114. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/policies/create_policy.py +0 -0
  115. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/policies/delete_policy.py +0 -0
  116. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/policies/get_policy.py +0 -0
  117. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/policies/list_policies.py +0 -0
  118. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/policies/update_policy.py +0 -0
  119. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/service_accounts/__init__.py +0 -0
  120. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/service_accounts/create_api_key_for_service_account.py +0 -0
  121. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/service_accounts/create_workspace_service_account.py +0 -0
  122. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/service_accounts/delete_api_key_for_service_account.py +0 -0
  123. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/service_accounts/delete_workspace_service_account.py +0 -0
  124. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/service_accounts/get_workspace_service_accounts.py +0 -0
  125. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/service_accounts/list_api_keys_for_service_account.py +0 -0
  126. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/service_accounts/update_workspace_service_account.py +0 -0
  127. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/store/__init__.py +0 -0
  128. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/store/get_store_agent.py +0 -0
  129. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/store/get_store_function.py +0 -0
  130. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/store/list_store_agents.py +0 -0
  131. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/store/list_store_functions.py +0 -0
  132. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/__init__.py +0 -0
  133. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/accept_workspace_invitation.py +0 -0
  134. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/create_worspace.py +0 -0
  135. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/decline_workspace_invitation.py +0 -0
  136. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/delete_workspace.py +0 -0
  137. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/get_workspace.py +0 -0
  138. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/invite_workspace_user.py +0 -0
  139. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/leave_workspace.py +0 -0
  140. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/list_workspace_users.py +0 -0
  141. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/list_workspaces.py +0 -0
  142. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/remove_workspace_user.py +0 -0
  143. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/update_workspace.py +0 -0
  144. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/api/workspaces/update_workspace_user_role.py +0 -0
  145. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/authentication/__init__.py +0 -0
  146. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/authentication/apikey.py +0 -0
  147. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/authentication/clientcredentials.py +0 -0
  148. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/authentication/device_mode.py +0 -0
  149. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/client.py +0 -0
  150. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/common/__init__.py +0 -0
  151. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/common/logger.py +0 -0
  152. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/common/secrets.py +0 -0
  153. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/common/utils.py +0 -0
  154. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/errors.py +0 -0
  155. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/functions/__init__.py +0 -0
  156. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/functions/decorator.py +0 -0
  157. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/__init__.py +0 -0
  158. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/acl.py +0 -0
  159. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent.py +0 -0
  160. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_chain.py +0 -0
  161. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_configuration.py +0 -0
  162. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_deployment.py +0 -0
  163. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_deployment_configuration.py +0 -0
  164. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_deployment_configuration_type_0.py +0 -0
  165. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_deployment_history.py +0 -0
  166. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_deployment_history_event.py +0 -0
  167. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_deployment_pod_template.py +0 -0
  168. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_deployment_pod_template_type_0.py +0 -0
  169. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_history.py +0 -0
  170. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_history_event.py +0 -0
  171. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_metadata.py +0 -0
  172. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_release.py +0 -0
  173. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_spec.py +0 -0
  174. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/agent_with_deployments.py +0 -0
  175. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/api_key.py +0 -0
  176. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/authentication_provider_model.py +0 -0
  177. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/authentication_provider_organization.py +0 -0
  178. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/configuration.py +0 -0
  179. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/continent.py +0 -0
  180. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/core_spec.py +0 -0
  181. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/country.py +0 -0
  182. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/create_api_key_for_service_account_body.py +0 -0
  183. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/create_workspace_service_account_body.py +0 -0
  184. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/create_workspace_service_account_response_200.py +0 -0
  185. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/delete_workspace_service_account_response_200.py +0 -0
  186. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/deployment_configuration.py +0 -0
  187. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/deployment_configurations.py +0 -0
  188. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/deployment_serverless_config.py +0 -0
  189. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/deployment_serverless_config_type_0.py +0 -0
  190. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/environment.py +0 -0
  191. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/environment_metrics.py +0 -0
  192. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/environment_spec.py +0 -0
  193. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/flavor.py +0 -0
  194. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function.py +0 -0
  195. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_configuration.py +0 -0
  196. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_deployment.py +0 -0
  197. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_deployment_configuration.py +0 -0
  198. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_deployment_configuration_type_0.py +0 -0
  199. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_deployment_pod_template.py +0 -0
  200. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_deployment_pod_template_type_0.py +0 -0
  201. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_kit.py +0 -0
  202. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_metadata.py +0 -0
  203. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_provider_ref.py +0 -0
  204. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_release.py +0 -0
  205. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_spec.py +0 -0
  206. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/function_with_deployments.py +0 -0
  207. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/get_workspace_service_accounts_response_200_item.py +0 -0
  208. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/increase_and_rate_metric.py +0 -0
  209. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/integration.py +0 -0
  210. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/integration_config.py +0 -0
  211. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/integration_connection.py +0 -0
  212. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/integration_connection_config.py +0 -0
  213. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/integration_connection_secret.py +0 -0
  214. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/integration_connection_spec.py +0 -0
  215. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/integration_model.py +0 -0
  216. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/integration_secret.py +0 -0
  217. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/invite_workspace_user_body.py +0 -0
  218. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/labels_type_0.py +0 -0
  219. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/location.py +0 -0
  220. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/location_response.py +0 -0
  221. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/metadata.py +0 -0
  222. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/metadata_labels.py +0 -0
  223. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/metric.py +0 -0
  224. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/metrics.py +0 -0
  225. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model.py +0 -0
  226. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_deployment.py +0 -0
  227. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_deployment_log.py +0 -0
  228. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_deployment_metrics.py +0 -0
  229. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +0 -0
  230. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +0 -0
  231. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_deployment_pod_template.py +0 -0
  232. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_deployment_pod_template_type_0.py +0 -0
  233. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_metadata.py +0 -0
  234. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_metrics.py +0 -0
  235. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_provider.py +0 -0
  236. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_provider_ref.py +0 -0
  237. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_release.py +0 -0
  238. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_spec.py +0 -0
  239. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/model_with_deployments.py +0 -0
  240. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/owner_fields.py +0 -0
  241. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/pending_invitation.py +0 -0
  242. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/pending_invitation_accept.py +0 -0
  243. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/pending_invitation_render.py +0 -0
  244. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/pending_invitation_render_invited_by.py +0 -0
  245. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/pending_invitation_render_workspace.py +0 -0
  246. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/pending_invitation_workspace_details.py +0 -0
  247. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/pod_template_spec.py +0 -0
  248. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/policy.py +0 -0
  249. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/policy_location.py +0 -0
  250. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/policy_spec.py +0 -0
  251. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/provider_config.py +0 -0
  252. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/qps.py +0 -0
  253. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_deployment_log.py +0 -0
  254. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_deployment_metrics.py +0 -0
  255. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_deployment_metrics_inference_per_region.py +0 -0
  256. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +0 -0
  257. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +0 -0
  258. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +0 -0
  259. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_deployment_metrics_query_per_region_per_code.py +0 -0
  260. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +0 -0
  261. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +0 -0
  262. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +0 -0
  263. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_environment_metrics.py +0 -0
  264. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +0 -0
  265. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +0 -0
  266. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_log.py +0 -0
  267. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/resource_metrics.py +0 -0
  268. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/runtime.py +0 -0
  269. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/runtime_readiness_probe.py +0 -0
  270. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/runtime_readiness_probe_type_0.py +0 -0
  271. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/runtime_resources.py +0 -0
  272. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/runtime_type_0.py +0 -0
  273. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/runtime_type_0_readiness_probe.py +0 -0
  274. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/runtime_type_0_readiness_probe_type_0.py +0 -0
  275. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/runtime_type_0_resources.py +0 -0
  276. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/serverless_config.py +0 -0
  277. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/spec_configuration.py +0 -0
  278. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/standard_fields_dynamo_db.py +0 -0
  279. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_agent.py +0 -0
  280. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_agent_configuration.py +0 -0
  281. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_agent_labels.py +0 -0
  282. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_agent_labels_type_0.py +0 -0
  283. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_configuration.py +0 -0
  284. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_configuration_option.py +0 -0
  285. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_function.py +0 -0
  286. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_function_configuration.py +0 -0
  287. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_function_kit.py +0 -0
  288. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_function_labels.py +0 -0
  289. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_function_labels_type_0.py +0 -0
  290. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/store_function_parameter.py +0 -0
  291. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/time_fields.py +0 -0
  292. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/update_workspace_service_account_body.py +0 -0
  293. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/update_workspace_service_account_response_200.py +0 -0
  294. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/update_workspace_user_role_body.py +0 -0
  295. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/websocket_channel.py +0 -0
  296. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/workspace.py +0 -0
  297. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/workspace_labels.py +0 -0
  298. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/models/workspace_user.py +0 -0
  299. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/py.typed +0 -0
  300. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/run.py +0 -0
  301. {beamlit-0.0.20rc6 → beamlit-0.0.20rc7}/src/beamlit/types.py +0 -0
@@ -1,15 +1,17 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: beamlit
3
- Version: 0.0.20rc6
3
+ Version: 0.0.20rc7
4
4
  Summary: Add your description here
5
5
  Author-email: cploujoux <ch.ploujoux@gmail.com>
6
6
  Requires-Python: >=3.12
7
- Requires-Dist: asgi-correlation-id==4.3.4
7
+ Requires-Dist: asgi-correlation-id<5.0.0,>=4.3.4
8
8
  Requires-Dist: attrs>=21.3.0
9
- Requires-Dist: fastapi[standard]==0.115.4
9
+ Requires-Dist: fastapi[standard]<0.116.0,>=0.115.4
10
10
  Requires-Dist: httpx<0.28.0,>=0.20.0
11
- Requires-Dist: langchain-core==0.3.13
12
- Requires-Dist: langgraph==0.2.40
11
+ Requires-Dist: langchain-community<0.4.0,>=0.3.3
12
+ Requires-Dist: langchain-core<0.4.0,>=0.3.13
13
+ Requires-Dist: langchain-openai<0.3.0,>=0.2.4
14
+ Requires-Dist: langgraph<0.3.0,>=0.2.40
13
15
  Requires-Dist: pydantic-settings<2.7.0,>=2.6.1
14
16
  Requires-Dist: pydantic<2.11.0,>=2.10.3
15
17
  Requires-Dist: python-dateutil>=2.8.0
@@ -0,0 +1,5 @@
1
+ agent:
2
+ functions_directory: src/integrationtest/functions
3
+ server:
4
+ module: integrationtest.agent.main
5
+ port: 1338
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "beamlit"
3
- version = "0.0.20.pre-6"
3
+ version = "0.0.20.pre-7"
4
4
  description = "Add your description here"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -19,10 +19,12 @@ dependencies = [
19
19
  "pydantic-settings>=2.6.1,<2.7.0",
20
20
  "pydantic>=2.10.3,<2.11.0",
21
21
  "requests>=2.32.3,<2.33.0",
22
- "langchain-core==0.3.13",
23
- "langgraph==0.2.40",
24
- "fastapi[standard]==0.115.4",
25
- "asgi-correlation-id==4.3.4",
22
+ "langchain-core>=0.3.13,<0.4.0",
23
+ "langchain-community>=0.3.3,<0.4.0",
24
+ "langchain-openai>=0.2.4,<0.3.0",
25
+ "langgraph>=0.2.40,<0.3.0",
26
+ "fastapi[standard]>=0.115.4,<0.116.0",
27
+ "asgi-correlation-id>=4.3.4,<5.0.0",
26
28
  ]
27
29
  [dependency-groups]
28
30
  dev = [
@@ -34,7 +36,7 @@ requires = ["hatchling"]
34
36
  build-backend = "hatchling.build"
35
37
 
36
38
  [tool.ruff]
37
- line-length = 120
39
+ line-length = 100
38
40
 
39
41
  [tool.ruff.lint]
40
42
  select = ["F", "I", "UP"]
@@ -62,12 +62,12 @@ def get_chat_model(agent_model: AgentDeployment):
62
62
  raise ValueError("agent_model not found in configuration")
63
63
  if agent_model.runtime is None:
64
64
  raise ValueError("runtime not found in agent model")
65
- if agent_model.runtime.type is None:
65
+ if agent_model.runtime.type_ is None:
66
66
  raise ValueError("type not found in runtime")
67
67
  if agent_model.runtime.model is None:
68
68
  raise ValueError("model not found in runtime")
69
69
 
70
- provider = agent_model.runtime.type
70
+ provider = agent_model.runtime.type_
71
71
  model = agent_model.runtime.model
72
72
 
73
73
  kwargs = {
@@ -34,7 +34,10 @@ def get_functions(dir="src/functions", from_decorator="function"):
34
34
 
35
35
  # Look for function definitions with decorators
36
36
  for node in ast.walk(tree):
37
- if not isinstance(node, ast.FunctionDef) or len(node.decorator_list) == 0:
37
+ if (
38
+ not isinstance(node, ast.FunctionDef)
39
+ or len(node.decorator_list) == 0
40
+ ):
38
41
  continue
39
42
  decorator = node.decorator_list[0]
40
43
 
@@ -56,7 +59,9 @@ def get_functions(dir="src/functions", from_decorator="function"):
56
59
  is_kit = False
57
60
  if isinstance(decorator, ast.Call):
58
61
  for keyword in decorator.keywords:
59
- if keyword.arg == "kit" and isinstance(keyword.value, ast.Constant):
62
+ if keyword.arg == "kit" and isinstance(
63
+ keyword.value, ast.Constant
64
+ ):
60
65
  is_kit = keyword.value.value
61
66
  if is_kit:
62
67
  kit_functions = get_functions(
@@ -87,9 +92,9 @@ def agent(
87
92
 
88
93
  def wrapped(*args, **kwargs):
89
94
  return func(
90
- settings.agent,
91
- settings.agent_chat_model,
92
- settings.agent_functions,
95
+ settings.agent.agent,
96
+ settings.agent.chat_model,
97
+ settings.agent.functions,
93
98
  *args,
94
99
  **kwargs,
95
100
  )
@@ -97,33 +102,46 @@ def agent(
97
102
  return wrapped
98
103
 
99
104
  # Initialize functions array to store decorated functions
100
- functions = get_functions()
101
- settings.agent_functions = functions
105
+ functions = get_functions(dir=settings.agent.functions_directory)
106
+ settings.agent.functions = functions
102
107
 
103
108
  if bl_agent.model and chat_model is None:
104
109
  client = new_client()
105
110
  try:
106
- response = get_model_deployment.sync_detailed(bl_agent.model, settings.environment, client=client)
107
- settings.agent_model = response.parsed
111
+ response = get_model_deployment.sync_detailed(
112
+ bl_agent.model, settings.environment, client=client
113
+ )
114
+ settings.agent.model = response.parsed
108
115
  except UnexpectedStatus as e:
109
116
  if e.status_code == 404 and settings.environment != "production":
110
117
  try:
111
- response = get_model_deployment.sync_detailed(bl_agent.model, "production", client=client)
112
- settings.agent_model = response.parsed
118
+ response = get_model_deployment.sync_detailed(
119
+ bl_agent.model, "production", client=client
120
+ )
121
+ settings.agent.model = response.parsed
113
122
  except UnexpectedStatus as e:
114
123
  if e.status_code == 404:
115
124
  raise ValueError(f"Model {bl_agent.model} not found")
116
125
  else:
117
126
  raise e
118
-
119
- chat_model = get_chat_model(settings.agent_model)
120
- settings.agent_chat_model = chat_model
121
- runtime = settings.agent_model.runtime
122
- logger.info(f"Chat model configured, using: {runtime.type}:{runtime.model}")
127
+ chat_model = get_chat_model(settings.agent.model)
128
+ settings.agent.chat_model = chat_model
129
+ runtime = settings.agent.model.runtime
130
+ logger.info(f"Chat model configured, using: {runtime.type_}:{runtime.model}")
131
+
132
+ if len(functions) == 0:
133
+ raise ValueError(
134
+ "You must define at least one function, you can define this function in directory "
135
+ f'"{settings.agent.functions_directory}". Here is a sample function you can use:\n\n'
136
+ "from beamlit.functions import function\n\n"
137
+ "@function()\n"
138
+ "def hello_world(query: str):\n"
139
+ " return 'Hello, world!'\n"
140
+ )
123
141
 
124
142
  if agent is None and chat_model is not None:
125
143
  memory = MemorySaver()
126
144
  agent = create_react_agent(chat_model, functions, checkpointer=memory)
127
- settings.agent = agent
145
+ settings.agent.agent = agent
128
146
 
129
147
  return wrapper
@@ -66,9 +66,7 @@ def new_client_with_credentials(config: RunClientWithCredentials):
66
66
  elif config.credentials.access_token:
67
67
  provider = BearerToken(config.credentials, config.workspace, config.api_url)
68
68
  elif config.credentials.client_credentials:
69
- provider = ClientCredentials(
70
- config.credentials, config.workspace, config.api_url
71
- )
69
+ provider = ClientCredentials(config.credentials, config.workspace, config.api_url)
72
70
  else:
73
71
  provider = PublicProvider()
74
72
 
@@ -76,7 +74,13 @@ def new_client_with_credentials(config: RunClientWithCredentials):
76
74
 
77
75
 
78
76
  def get_authentication_headers(settings: Settings) -> Dict[str, str]:
79
- credentials = load_credentials_from_settings(settings)
77
+ context = current_context()
78
+ if context.workspace:
79
+ credentials = load_credentials(context.workspace)
80
+ else:
81
+ settings = get_settings()
82
+ credentials = load_credentials_from_settings(settings)
83
+
80
84
  config = RunClientWithCredentials(
81
85
  credentials=credentials,
82
86
  workspace=settings.workspace,
@@ -87,9 +91,7 @@ def get_authentication_headers(settings: Settings) -> Dict[str, str]:
87
91
  elif config.credentials.access_token:
88
92
  provider = BearerToken(config.credentials, config.workspace, config.api_url)
89
93
  elif config.credentials.client_credentials:
90
- provider = ClientCredentials(
91
- config.credentials, config.workspace, config.api_url
92
- )
94
+ provider = ClientCredentials(config.credentials, config.workspace, config.api_url)
93
95
 
94
96
  if provider is None:
95
97
  return None
@@ -1,4 +1,5 @@
1
1
  from dataclasses import dataclass
2
+ from logging import getLogger
2
3
  from pathlib import Path
3
4
  from typing import List
4
5
 
@@ -6,6 +7,8 @@ import yaml
6
7
 
7
8
  from beamlit.common.settings import Settings
8
9
 
10
+ logger = getLogger(__name__)
11
+
9
12
 
10
13
  @dataclass
11
14
  class Credentials:
@@ -120,32 +123,35 @@ def load_credentials(workspace_name: str) -> Credentials:
120
123
  return Credentials()
121
124
 
122
125
 
123
- def load_credentials_from_settings(config: Settings) -> Credentials:
124
- return Credentials(api_key=config.api_key, client_credentials=config.client_credentials)
126
+ def load_credentials_from_settings(settings: Settings) -> Credentials:
127
+ return Credentials(
128
+ api_key=settings.authentication.api_key,
129
+ client_credentials=settings.authentication.client_credentials,
130
+ )
125
131
 
126
132
 
127
133
  def create_home_dir_if_missing():
128
134
  home_dir = Path.home()
129
135
  if not home_dir:
130
- print("Error getting home directory")
136
+ logger.error("Error getting home directory")
131
137
  return
132
138
 
133
139
  credentials_dir = home_dir / ".beamlit"
134
140
  credentials_file = credentials_dir / "credentials.json"
135
141
 
136
142
  if credentials_file.exists():
137
- print("You are already logged in. Enter a new API key to overwrite it.")
143
+ logger.warning("You are already logged in. Enter a new API key to overwrite it.")
138
144
  else:
139
145
  try:
140
146
  credentials_dir.mkdir(mode=0o700, parents=True, exist_ok=True)
141
147
  except Exception as e:
142
- print(f"Error creating credentials directory: {e}")
148
+ logger.error(f"Error creating credentials directory: {e}")
143
149
 
144
150
 
145
151
  def save_credentials(workspace_name: str, credentials: Credentials):
146
152
  create_home_dir_if_missing()
147
153
  if not credentials.access_token and not credentials.api_key:
148
- print("No credentials to save, error")
154
+ logger.info("No credentials to save, error")
149
155
  return
150
156
 
151
157
  config = load_config()
@@ -155,8 +155,8 @@ run_client = RunClient(client=client)
155
155
  export_code = "\n\nfunctions = ["
156
156
  export_chain = "\n\nchains = ["
157
157
  code = imports
158
- if settings.agent_functions and len(settings.agent_functions) > 0:
159
- for function_config in settings.agent_functions:
158
+ if settings.agent.functions and len(settings.agent.functions) > 0:
159
+ for function_config in settings.agent.functions:
160
160
  if function_config.kit and len(function_config.kit) > 0:
161
161
  new_code, export = generate_kit_function_code(settings, function_config, function_config.kit)
162
162
  code += new_code
@@ -165,15 +165,15 @@ run_client = RunClient(client=client)
165
165
  new_code, export = generate_function_code(settings, function_config)
166
166
  code += new_code
167
167
  export_code += export
168
- if settings.agent_chain and len(settings.agent_chain) > 0:
169
- for agent in settings.agent_chain:
168
+ if settings.agent.chain and len(settings.agent.chain) > 0:
169
+ for agent in settings.agent.chain:
170
170
  new_code, export = generate_chain_code(settings, agent)
171
171
  code += new_code
172
172
  export_chain += export
173
- if settings.agent_functions and len(settings.agent_functions) > 0:
173
+ if settings.agent.functions and len(settings.agent.functions) > 0:
174
174
  export_code = export_code[:-1]
175
175
  export_code += "]"
176
- if settings.agent_chain and len(settings.agent_chain) > 0:
176
+ if settings.agent.chain and len(settings.agent.chain) > 0:
177
177
  export_chain = export_chain[:-1]
178
178
  export_chain += "]"
179
179
  content = code + export_code + export_chain
@@ -1,11 +1,16 @@
1
1
  import os
2
2
  from logging import getLogger
3
- from typing import Any, List, Tuple, Type, Union
3
+ from typing import List, Tuple, Type, Union
4
4
 
5
5
  from langchain_core.language_models.chat_models import BaseChatModel
6
6
  from langgraph.graph.graph import CompiledGraph
7
7
  from pydantic import Field
8
- from pydantic_settings import BaseSettings, PydanticBaseSettingsSource, SettingsConfigDict, YamlConfigSettingsSource
8
+ from pydantic_settings import (
9
+ BaseSettings,
10
+ PydanticBaseSettingsSource,
11
+ SettingsConfigDict,
12
+ YamlConfigSettingsSource,
13
+ )
9
14
 
10
15
  from beamlit.api.functions import get_function_deployment
11
16
  from beamlit.api.models import get_model_deployment
@@ -24,6 +29,28 @@ def get_settings():
24
29
  return SETTINGS
25
30
 
26
31
 
32
+ class SettingsAgent(BaseSettings):
33
+ agent: Union[None, CompiledGraph, BaseChatModel] = None
34
+ chain: Union[Unset, List[AgentDeployment]] = UNSET
35
+ model: Union[Unset, ModelDeployment] = UNSET
36
+ functions: Union[Unset, List[FunctionDeployment]] = UNSET
37
+ functions_directory: str = Field(default="src/functions")
38
+ chat_model: Union[None, BaseChatModel] = None
39
+ module: str = Field(default="main.main")
40
+
41
+
42
+ class SettingsAuthentication(BaseSettings):
43
+ api_key: Union[None, str] = None
44
+ jwt: Union[None, str] = None
45
+ client_credentials: Union[None, str] = None
46
+
47
+
48
+ class SettingsServer(BaseSettings):
49
+ module: str = Field(default="main.main")
50
+ port: int = Field(default=80)
51
+ host: str = Field(default="0.0.0.0")
52
+
53
+
27
54
  class Settings(BaseSettings):
28
55
  model_config = SettingsConfigDict(
29
56
  yaml_file="beamlit.yaml",
@@ -31,24 +58,15 @@ class Settings(BaseSettings):
31
58
  )
32
59
 
33
60
  workspace: str
34
- type: str
35
- name: str
36
- environment: str = Field(default="production")
61
+ environment: str
62
+ type: str = Field(default="agent")
63
+ name: str = Field(default="beamlit-agent")
37
64
  base_url: str = Field(default="https://api.beamlit.dev/v0")
38
65
  run_url: str = Field(default="https://run.beamlit.dev")
39
- port: int = Field(default=80)
40
- host: str = Field(default="0.0.0.0")
41
66
  log_level: str = Field(default="INFO")
42
- api_key: Union[None, str] = None
43
- jwt: Union[None, str] = None
44
- client_credentials: Union[None, str] = None
45
- agent_module: str = Field(default="main.main")
46
- agent_chain: Union[Unset, List[AgentDeployment]] = UNSET
47
- agent_functions: Union[Unset, List[FunctionDeployment]] = UNSET
48
- agent_model: Union[Unset, ModelDeployment] = UNSET
49
- agent: Union[None, CompiledGraph, BaseChatModel] = None
50
- agent_chat_model: Union[None, BaseChatModel] = None
51
- agent_functions: Union[None, List[Any]] = None
67
+ agent: SettingsAgent = SettingsAgent()
68
+ server: SettingsServer = SettingsServer()
69
+ authentication: SettingsAuthentication = SettingsAuthentication()
52
70
 
53
71
  @classmethod
54
72
  def settings_customise_sources(
@@ -76,14 +94,14 @@ def init_agent(
76
94
  from beamlit.common.generate import generate
77
95
 
78
96
  logger = getLogger(__name__)
79
-
97
+ settings = get_settings()
80
98
  # Init configuration from environment variables
81
- if SETTINGS.agent_functions or SETTINGS.agent_chain:
99
+ if settings.agent.functions or settings.agent.chain:
82
100
  return
83
101
 
84
102
  # Init configuration from beamlit control plane
85
- name = SETTINGS.name
86
- env = SETTINGS.environment
103
+ name = settings.name
104
+ env = settings.environment
87
105
 
88
106
  agent_deployment = get_agent_deployment.sync(name, env, client=client)
89
107
  function_deployments = []
@@ -92,7 +110,7 @@ def init_agent(
92
110
  for function in agent_deployment.functions:
93
111
  function_deployment = get_function_deployment.sync(function, env, client=client)
94
112
  function_deployments.append(function_deployment)
95
- SETTINGS.agent_functions = function_deployments
113
+ settings.agent.functions = function_deployments
96
114
 
97
115
  if agent_deployment.agent_chain:
98
116
  for chain in agent_deployment.agent_chain:
@@ -101,25 +119,37 @@ def init_agent(
101
119
  if chain.description:
102
120
  agent_deployment.description = chain.description
103
121
  agent_chain_deployments.append(agent_deployment)
104
- SETTINGS.agent_chain = agent_chain_deployments
122
+ settings.agent.chain = agent_chain_deployments
105
123
  if agent_deployment.model:
106
124
  model_deployment = get_model_deployment.sync(agent_deployment.model, env, client=client)
107
- SETTINGS.agent_model = model_deployment
125
+ settings.agent.model = model_deployment
108
126
 
109
127
  content_generate = generate(destination, dry_run=True)
110
128
  compared_content = None
111
129
  if os.path.exists(destination):
112
130
  compared_content = open(destination).read()
113
131
 
114
- if not os.path.exists(destination) or (compared_content and content_generate != compared_content):
132
+ if not os.path.exists(destination) or (
133
+ compared_content and content_generate != compared_content
134
+ ):
115
135
  logger.info("Generating agent code")
116
136
  generate(destination)
117
137
 
118
138
 
119
139
  def init() -> Settings:
120
140
  """Parse the beamlit.yaml file to get configurations."""
141
+ from beamlit.authentication.credentials import current_context
142
+
121
143
  global SETTINGS
122
144
 
123
- SETTINGS = Settings()
145
+ context = current_context()
146
+ kwargs = {}
147
+ if context.workspace:
148
+ kwargs["workspace"] = context.workspace
149
+ if context.environment:
150
+ kwargs["environment"] = context.environment
151
+
152
+ SETTINGS = Settings(**kwargs)
124
153
  init_logger(SETTINGS.log_level)
154
+
125
155
  return SETTINGS
@@ -0,0 +1,73 @@
1
+ import importlib
2
+ import traceback
3
+ from logging import getLogger
4
+ from uuid import uuid4
5
+
6
+ from asgi_correlation_id import CorrelationIdMiddleware
7
+ from fastapi import FastAPI, Request, Response
8
+ from fastapi.responses import JSONResponse
9
+
10
+ from beamlit.common.settings import get_settings, init
11
+
12
+ from .middlewares import AccessLogMiddleware, AddProcessTimeHeader
13
+
14
+
15
+ def import_module():
16
+ settings = get_settings()
17
+ main_module = importlib.import_module(".".join(settings.server.module.split(".")[0:-1]))
18
+ func = getattr(main_module, settings.server.module.split(".")[-1])
19
+ return func
20
+
21
+
22
+ settings = init()
23
+ logger = getLogger(__name__)
24
+ logger.info(f"Importing server module: {settings.server.module}")
25
+ func = import_module()
26
+ logger.info(
27
+ f"Running server with environment {settings.environment}"
28
+ f" on {settings.server.host}:{settings.server.port}"
29
+ )
30
+
31
+ app = FastAPI(docs_url=None, redoc_url=None)
32
+ app.add_middleware(
33
+ CorrelationIdMiddleware,
34
+ header_name="x-beamlit-request-id",
35
+ generator=lambda: str(uuid4()),
36
+ )
37
+ app.add_middleware(AddProcessTimeHeader)
38
+ app.add_middleware(AccessLogMiddleware)
39
+
40
+
41
+ @app.get("/health")
42
+ async def health():
43
+ return {"status": "ok"}
44
+
45
+
46
+ @app.post("/")
47
+ async def root(request: Request):
48
+ settings = get_settings()
49
+ logger = getLogger(__name__)
50
+ try:
51
+ body = await request.json()
52
+ response = await func(body)
53
+ if isinstance(response, Response):
54
+ return response
55
+ if type(response) is str:
56
+ return Response(
57
+ content=response,
58
+ headers={"Content-Type": "text/plain"},
59
+ media_type="text/plain",
60
+ status_code=200,
61
+ )
62
+ return JSONResponse(status_code=200, content=response)
63
+ except ValueError as e:
64
+ content = {"error": str(e)}
65
+ if settings.environment == "development":
66
+ content["traceback"] = str(traceback.format_exc())
67
+ logger.error(f"{content}")
68
+ return JSONResponse(status_code=400, content=content)
69
+ except Exception as e:
70
+ content = {"error": f"Internal server error, {e}"}
71
+ if settings.environment == "development":
72
+ content["traceback"] = str(traceback.format_exc())
73
+ return JSONResponse(status_code=500, content=content)
@@ -0,0 +1,4 @@
1
+ from .accesslog import AccessLogMiddleware
2
+ from .processtime import AddProcessTimeHeader
3
+
4
+ __all__ = ["AccessLogMiddleware", "AddProcessTimeHeader"]
@@ -0,0 +1,14 @@
1
+ from logging import getLogger
2
+
3
+ from starlette.middleware.base import BaseHTTPMiddleware
4
+
5
+
6
+ class AccessLogMiddleware(BaseHTTPMiddleware):
7
+ async def dispatch(self, request, call_next):
8
+ logger = getLogger(__name__)
9
+ response = await call_next(request)
10
+ process_time = response.headers.get("X-Process-Time")
11
+ rid_header = response.headers.get("X-Request-Id")
12
+ request_id = rid_header or response.headers.get("X-Beamlit-Request-Id")
13
+ logger.info(f"{request.method} {request.url.path} {response.status_code} {process_time}ms rid={request_id}")
14
+ return response
@@ -0,0 +1,12 @@
1
+ import time
2
+
3
+ from starlette.middleware.base import BaseHTTPMiddleware
4
+
5
+
6
+ class AddProcessTimeHeader(BaseHTTPMiddleware):
7
+ async def dispatch(self, request, call_next):
8
+ start_time = time.perf_counter()
9
+ response = await call_next(request)
10
+ process_time = (time.perf_counter() - start_time) * 1000
11
+ response.headers["X-Process-Time"] = f"{process_time:.2f}"
12
+ return response
@@ -0,0 +1,39 @@
1
+ import asyncio
2
+ import uuid
3
+
4
+ from beamlit.agents import agent
5
+ from beamlit.models import AgentDeployment
6
+
7
+
8
+ @agent(
9
+ AgentDeployment(
10
+ agent="agent-custom",
11
+ description="A chat agent using Beamlit to handle your tasks.",
12
+ model="gpt-4o-mini",
13
+ ),
14
+ )
15
+ async def main(agent, chat_model, tools, body, headers=None, query_params=None, **_):
16
+ agent_config = {"configurable": {"thread_id": str(uuid.uuid4())}}
17
+ if body.get("inputs"):
18
+ body["input"] = body["inputs"]
19
+
20
+ agent_body = {"messages": [("user", body["input"])]}
21
+ responses = []
22
+
23
+ for chunk in agent.stream(agent_body, config=agent_config):
24
+ responses.append(chunk)
25
+ content = responses[-1]
26
+ return content["agent"]["messages"][-1].content
27
+
28
+
29
+ if __name__ == "__main__":
30
+
31
+ async def check():
32
+ response = await main(
33
+ {"input": "What does 4+2 ?"},
34
+ headers={"X-Beamlit-Sub": "123"},
35
+ query_params={"debug": "false"},
36
+ )
37
+ print(response)
38
+
39
+ asyncio.run(check())
@@ -0,0 +1,7 @@
1
+ from beamlit.functions import function
2
+
3
+
4
+ @function()
5
+ def helloworld(query: str):
6
+ """A function for saying hello to the world."""
7
+ return "Hello, world!"
@@ -1,11 +1,11 @@
1
1
  from beamlit.api.models import get_model_deployment
2
- from beamlit.authentication import get_authentication_headers, new_client_from_settings
2
+ from beamlit.authentication import get_authentication_headers, new_client
3
3
  from beamlit.common.settings import init
4
4
  from beamlit.models.model_deployment import ModelDeployment
5
5
  from beamlit.run import RunClient
6
6
 
7
7
  settings = init()
8
- client = new_client_from_settings(settings)
8
+ client = new_client()
9
9
  model_deployment: ModelDeployment = get_model_deployment.sync("gpt-4o-mini", "production", client=client)
10
10
  # init_agent(client=client)
11
11
  run_client = RunClient(client=client)