Mar-21-2024, 09:43 PM
Thanks for your time, guys. Actually my code (which works perfectly without errors) does not handle the parameters. The openai chact model is using the functions when needed. I only wanted beautify the code by copying the functions into another .py and was looking for a solution outside of import command. If there is no such solution I'll keep it as it is. Thanks again.
(Mar-21-2024, 04:28 AM)deanhystad Wrote: This sounds backward
Quote:two.py would have a function receiving a parameter which is a variable set in one.py
"functions" should not "receive" parameters from a module. functions should be passed arguments. If you want to call a function in module B using a variable defined in module A, I would write module A like this:
import B parameter= 5 result = B.func(parameter)You should post your code instead of having us guess the best way to organize the modules.