Undertone0809 / promptulate

🚀Lightweight Large language model automation and Autonomous Language Agents development framework. Build your LLM Agent Application in a pythonic way!
https://promptulate.cn/
Apache License 2.0
334 stars 34 forks source link

自定义llm这里对azure支持不太友好,本想仿造openai.py编写,发现很多代码都写死了,建议使用openai库编写自定义llm,可以更好支持azure #282

Closed ForgetThatNight closed 10 months ago

Issues-translate-bot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: The custom llm here is not very friendly to azure support. I wanted to imitate openai.py to write it, but found that a lot of the code was hard-coded. It is recommended to use the openai library to write a custom llm, which can better support azure.

github-actions[bot] commented 10 months ago

Hello @ForgetThatNight, thanks for your first issue and interest in our work 😊!

If this is a bug report, please provide screenshots, relevant logs and minimum viable code to reproduce your issue, which will help us debug the problem.

Undertone0809 commented 10 months ago

Thanks your feedback! I want to rebuild BaseLLM implement so that we can custom LLM more easily. However, original BaseLLM use pydantic v1 to build. It introduces too much code style invasiveness, increasing development difficulty.

In the future, I think we will remove Pydantic style and make it compatible with the original implementation style.

Undertone0809 commented 10 months ago

You can implement Azure and it's best not to follow the openai.py implementation.

ruanrongman commented 10 months ago

I think so, it's best not to follow the openai.py implementation.

Undertone0809 commented 10 months ago

ref: https://undertone0809.github.io/promptulate/#/modules/llm/custom_llm?id=custom-llm