claude 3
1.0.0
Temui Claude 3 Haiku , iblis kecepatan yang memproses 30 halaman dalam blink, intelek menetapkan tolok ukur baru, dan foto penguraian visioner ke diagram teknis. Sempurna untuk peran
Jika Anda menggunakannya melalui front-end, untuk Libels, Sillytavern, janitorai dll.
https://galaxyapi.onrender.comcurl https://galaxyapi.onrender.com/v1/chat/completions
-H " Content-Type: application/json "
-H " Authorization: Bearer $GALAXYAI_API_KEY "
-d ' {
"model": "claude-3-haiku-20240307",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
} 'Python
from openai import OpenAI
client = OpenAI ( apikey = "galaxy-secret-key-here" )
client . base_url = "https://galaxyapi.onrender.com/v1"
completion = client . chat . completions . create (
model = "claude-3-haiku-20240307" ,
messages = [
{ "role" : "system" , "content" : "You are a helpful assistant." },
{ "role" : "user" , "content" : "Hello!" }
]
)
print ( completion . choices [ 0 ]. message )NodeJS
import OpenAI from "openai" ;
const openai = new OpenAI ( {
apiKey : 'GALAXY_API_KEY' ,
baseURL : 'https://galaxyapi.onrender.com/v1'
} )
async function main ( ) {
const completion = await openai . chat . completions . create ( {
messages : [ { role : "system" , content : "You are a helpful assistant." } ] ,
model : "claude-3-haiku-20240307" ,
} ) ;
console . log ( completion . choices [ 0 ] ) ;
}
main ( ) ;Memiliki masalah, jangan ragu untuk melaporkannya dengan membuat masalah atau melaporkannya di sini.