Skip to content

fix(python): use the default context when none is configured - #97

Open
rioyu123 wants to merge 1 commit into
paypal:mainfrom
rioyu123:fix/python-default-context
Open

fix(python): use the default context when none is configured#97
rioyu123 wants to merge 1 commit into
paypal:mainfrom
rioyu123:fix/python-default-context

Conversation

@rioyu123

Copy link
Copy Markdown

Summary

The Python toolkits currently try to call Configuration.Context.default() when Configuration.context is omitted or None. Context is a module-level class rather than an attribute of Configuration, so toolkit construction raises AttributeError before any PayPal request is made.

This change uses Context.default() in the OpenAI, LangChain, CrewAI, and Bedrock adapters. Caller-provided contexts and each adapter's source label remain unchanged.

Testing

  • Compiled the Python package with compileall.
  • Instantiated all four affected toolkits with context=None without making network requests and verified the default context and adapter-specific source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant