Quick Start
LLM as a service quick start
Setting up API Key
After accessing LLM as a service, you need to set up your API key. Learn how to set your API key here.
Quickly test API
To quickly try the API using cURL, use the following command:
curl -X POST https://api.float16.cloud/v1/chat/completions -d
'{
"model": "seallm-7b-v3",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "ΰΈͺΰΈ§ΰΈ±ΰΈͺΰΈΰΈ΅"
}
]
}'
-H "Content-Type: application/json"
-H "Authorization: Bearer <float16-api-key>"Paste this in your terminal to see the response.
Using the Chat API
Our API is compatible with OpenAI, allowing integration with your chat UI using OpenAI or LangChain libraries.
OpenAI
Install the OpenAI package:
Use this Python code snippet (example using SeaLLM-7B-v2.5 model):
For more information on the OpenAI library, visit the OpenAI docs.
LangChain
To use Float16.cloud with the LangChain, follow these steps:
Install the LangChain package:
or
Use this Python code snippet (example using SeaLLM-7B-v2.5 model):
For more information on the LangChain library, visit the LangChain docs.
Last updated