AshwinPathi / claude-api-py

Unofficial Python API for Anthropic's Claude LLM
https://pypi.org/project/claude-api-py/
MIT License
108 stars 11 forks source link

Hope to get your advice on the question #16

Closed winie-hy closed 10 months ago

winie-hy commented 11 months ago

Dear author, is it possible to implement asynchronously if I have multiple Sessionkeys? It seems that he is limited by the official single dialogue, can you give me some suggestions to increase his efficiency? Thank you ~

AshwinPathi commented 11 months ago

What type of API do you want to see? It would be a little easier for me to implement something if you have an interface in mind for your use case.

I don't really see an ergonomic way to allow this right now. The best way to do this would just be to create multiple "clients" with multiple session keys and swap those out. You can also switch conversation contexts to use different conversations. Yes the efficiency may be better with asynchronous, I am working on an implementation now.

xRiddin commented 11 months ago

we def need an asynchronous version of this, rn it's quite slow

AshwinPathi commented 10 months ago

@xRiddin yea I can work on this