44 ms·
Show HN: PyLLMs: – Connect and compare top AI models in Python
Hi HN,
We needed a simple way to connect to the top AI models to experiment, prototype and evaluate them.
Main features:
- Connect to top LLMs in few lines of code (currenly OpenAI, Anthropic and AI21 are supported)
- Response meta includes tokens processed, cost and latency standardized across the models
- Multi-model support: Get completitions from different models at the same time
- LLM benchmark: Eevaluate models on quality, speed and cost
The benchmark uses predefine questions to test AI reasoning abilities across a range of "hard" queries. The outputs are then automatically evaulauted using a powerful model (gpt-4 recommended): https://github.com/kagisearch/pyllms/blob/990855968b4bc26ab6d400ab3475be4ea4c4bf16/llms/llms.py#L131 https://github.com/kagisearch/pyllms/blob/990855968b4bc26ab6...
This helped uncover a hidden gem among models: 'claude-instant-v1' which is 4x faster, 2x cheaper and similar quality to 'crowd favorite' gpt-3.5-turbo.
- Paul-Craft 4y agoWow, this is great, and particularly relevant to my interests right now. :) Sure, I know how to make an HTTP request with an auth token, but there's a good deal more here than that, and I really appreciate it! Thanks!