@@ -1411,6 +1411,67 @@ describe.skip("InferenceClient", () => {
14111411 TIMEOUT
14121412 ) ;
14131413
1414+ describe . concurrent (
1415+ "Inceptron" ,
1416+ ( ) => {
1417+ const client = new InferenceClient ( env . HF_INCEPTRON_KEY ?? "dummy" ) ;
1418+
1419+ HARDCODED_MODEL_INFERENCE_MAPPING . inceptron = {
1420+ "meta-llama/Llama-3.3-70B-Instruct" : {
1421+ provider : "inceptron" ,
1422+ hfModelId : "meta-llama/Llama-3.3-70B-Instruct" ,
1423+ providerId : "meta-llama/Llama-3.3-70B-Instruct" ,
1424+ status : "live" ,
1425+ task : "conversational" ,
1426+ } ,
1427+ } ;
1428+
1429+ it ( "chatCompletion" , async ( ) => {
1430+ const res = await client . chatCompletion ( {
1431+ model : "meta-llama/Llama-3.3-70B-Instruct" ,
1432+ provider : "inceptron" ,
1433+ messages : [ { role : "user" , content : "Complete this sentence with words, one plus one is equal " } ] ,
1434+ } ) ;
1435+ if ( res . choices && res . choices . length > 0 ) {
1436+ const completion = res . choices [ 0 ] . message ?. content ;
1437+ expect ( completion ) . toMatch ( / ( t w o | 2 ) / i) ;
1438+ }
1439+ } ) ;
1440+
1441+ it ( "chatCompletion stream" , async ( ) => {
1442+ const stream = client . chatCompletionStream ( {
1443+ model : "meta-llama/Llama-3.3-70B-Instruct" ,
1444+ provider : "inceptron" ,
1445+ messages : [ { role : "user" , content : "Complete the equation 1 + 1 = , just the answer" } ] ,
1446+ } ) as AsyncGenerator < ChatCompletionStreamOutput > ;
1447+ let out = "" ;
1448+ for await ( const chunk of stream ) {
1449+ if ( chunk . choices && chunk . choices . length > 0 ) {
1450+ out += chunk . choices [ 0 ] . delta . content ;
1451+ }
1452+ }
1453+ expect ( out ) . toMatch ( / ( t w o | 2 ) / i) ;
1454+ } ) ;
1455+
1456+ it ( "textGeneration" , async ( ) => {
1457+ const res = await client . textGeneration ( {
1458+ model : "meta-llama/Llama-3.3-70B-Instruct" ,
1459+ provider : "inceptron" ,
1460+ inputs : "Once upon a time," ,
1461+ parameters : {
1462+ temperature : 0 ,
1463+ max_new_tokens : 20 ,
1464+ } ,
1465+ } ) ;
1466+
1467+ expect ( res ) . toHaveProperty ( "generated_text" ) ;
1468+ expect ( typeof res . generated_text ) . toBe ( "string" ) ;
1469+ expect ( res . generated_text . length ) . toBeGreaterThan ( 0 ) ;
1470+ } ) ;
1471+ } ,
1472+ TIMEOUT
1473+ ) ;
1474+
14141475 describe . concurrent (
14151476 "Nebius" ,
14161477 ( ) => {
0 commit comments