Closed ventz closed 1 year ago
I mean you can directly use File(name="file_name", content=b"file_content")
@shroominic Thanks!
That's what I did for the time being, but assuming since it's not a "public" method, it may change/break over time.
If it's not too much of a hassle, it would be helpful to add.
Good point yeah I try adding this!
Hi,
Great work on this project!!
Would it be possible to extend your
File
class (codeinterpreterapi/schema/file.py
) to provide afrom_content
function, in additional tofrom_path
andfrom_url
?That is, to be able to create a
File()
instance from acontent
directly?This would be key for being able to wrap this within Chainlit
Ex:
![image](https://github.com/shroominic/codeinterpreter-api/assets/901168/df387900-058b-4c23-9b49-73cd657e42b5)