Hi there,
After successfully obtaining the API_KEY, I tried the following code but received an AuthenticationError. Could you help me with this issue? Thanks a lot.
import openai
from openai import OpenAI
client = OpenAI(
base_url="https://fast-api.snova.ai/v1", # the endpoint IP running on vLLM
api_key=SAMBANOVA_API_KEY,
)
def call_llama(sys_prompt, prompt, **kwargs):
completion = client.chat.completions.create(
model="llama3-405b",
messages=[
{"role": "user", "content": prompt}
],
stream=True,
**kwargs,
)
response = ""
for chunk in completion:
response += chunk.choices[0].delta.content or ""
return response
sys_prompt = "Answer the question in a couple sentences."
prompt = "Share a happy story with me"
out = call_llama(sys_prompt, prompt)
print(out)