Add anyscale models
Hello! I am Shantanav. I am a beginner in open source contribution and I see this issue is labeled as a good first issue. I am interested in contributing to this repository. I will really appreciate any help in order to understand the issue and contribute to it. Thanks!
Hi @shantanavKapse, thank you for your help here. We'd like to add anyscale as an api provider. The task is as simple as:
- Creating a new file
phi/llm/anyscale/anyscale.pyby copying this file: https://github.com/phidatahq/phidata/blob/main/phi/llm/together/together.py.
It would look like:
from os import getenv
from typing import Optional
from phi.llm.openai.like import OpenAILike
class Anyscale(OpenAILike):
name: str = "Anyscale"
model: str = "meta-llama/Llama-2-70b-chat-hf"
api_key: Optional[str] = getenv("ANYSCALE_ENDPOINT_API_KEY")
base_url: str = "https://api.endpoints.anyscale.com/v1"
- Then creating a cookbook like this: https://github.com/phidatahq/phidata/tree/main/cookbook/together for anyscale
Here's more information:
You'll need an anyscale account to test: https://docs.endpoints.anyscale.com
They'll give you $10 of credits, if you need more -- i'm happy to give you my key which you can continue building with.
Happy to answer more questions, but this is mostly just:
- Creating an LLM provider for Anyscale
- Create a cookbook where you test the LLM
- Submitting a PR 🥳 🎉
Thank you @ashpreetbedi for guiding me through the issue. I really appreciate your help.