Hello
I am a new with SambaNova Fast Api.
I tried your draft code to check my test api key but getting the 500 internal server error and couldn’t get the result
I will attach my code.
SAMBANOVA_API_KEY = “”
from openai import OpenAI
client = OpenAI(
base_url=“https://fast-api.snova.ai/v1/chat/completions”,
api_key=SAMBANOVA_API_KEY,
)
model = “llama3-405b”
prompt = “Tell me a joke about artificial intelligence.”
I verified your code works with Vasanth’s modification
from openai import OpenAI
client = OpenAI(
base_url='https://fast-api.snova.ai/v1',
api_key='obfuscated',
)
model = 'llama3-405b'
prompt = 'Tell me a joke about artificial intelligence.'
completion = client.chat.completions.create(
model=model,
messages=[
{
'role': 'user',
'content': prompt,
}
],
stream=True,
)
response = ''
for chunk in completion:
response += chunk.choices[0].delta.content or ''
print(response)
>>> print(response)
Here's one:
Why did the AI program go to therapy?
Because it was struggling to process its emotions!
I hope that one computed to a laugh!
I apologize there was a typo in the above email address . Please use : sarosh.naseem@sambanovasystems.com . The one above was missing the first s in systems .
Hi, @cody and @Vasanth!
Could you let me know how many tokens I can use in test mode with the given api key?
Or the test api key expires in certain time?
I got the expiration alert once yesterday, and after that getting lower speed without any alert.
Please let me clear about this.
Thanks
@suslovwebhero I am so sorry for the delay . With the free tier the token count rate is per minute so it’s advisable to set your code up to handle the 429. The speed variance can be contributed to demand on the free tier assets . The developer tier will be coming soon and the enterprise tier is already available to purchase .
As to the specific rate limit items for the free tier we will be publishing those numbers soon.
We send several emails to sarosh.naseem@sambanovasystems.com about the pricing tiers but without success.
Woulds it be possible to move forward on this? We’re eager to move to a paying/custom tier so we can validate the real time user case which will make a significant difference for our project. Going real time would in fact be a game changer for our scaling.
Quick additional question: SambaNova is using OpenAI API to function. Does that imply any transfer of data to OpenAI? Any copyright or IP going to OpenAI in the process?
@jxbersot No we do not send any data to OpenAI. The use of their package is simply to make the moving of applications from other API vendors to ours easier. If you look at most AI endpoint vendors they use the OpenAI package.
Any update on the pricing part? We need it to move to higher limits and go on production. We’re on stand by because of this for a while now. Thanks for your help!