AI Function Helper는 OpenAI의 GPT 모델을 응용 프로그램에 통합하는 것을 단순화하는 강력한 Node.js 모듈입니다. AI 모델과 상호 작용하는 구조화 된 방법을 제공하여 일관되고 형식화 된 응답을 보장합니다.
NPM을 사용하여 AI 기능 헬퍼 설치 :
npm install ai-function-helper시작하는 간단한 예는 다음과 같습니다.
const { createAiFunctionInstance } = require ( 'ai-function-helper' ) ;
// Create an instance with your OpenAI API key
const aiFunction = createAiFunctionInstance ( 'your_api_key_here' ) ;
// Define your function
const options = {
functionName : 'generate_haiku' ,
model : 'gpt-3.5-turbo' ,
args : { topic : 'spring' } ,
description : 'Generate a haiku about the given topic.' ,
outputSchema : {
type : "object" ,
properties : {
haiku : { type : "string" }
} ,
required : [ "haiku" ]
}
} ;
// Call the function
aiFunction ( options )
. then ( result => console . log ( result . haiku ) )
. catch ( error => console . error ( error ) ) ; AI 기능 도우미를 사용하려면 먼저 OpenAI API 키로 인스턴스를 만들어야합니다.
const { createAiFunctionInstance } = require ( 'ai-function-helper' ) ;
const aiFunction = createAiFunctionInstance ( 'your_api_key_here' ) ;사용자 정의 엔드 포인트 URL을 사용할 수도 있습니다.
const aiFunction = createAiFunctionInstance ( 'your_api_key_here' , 'https://api.openai.com/v1' ) ;또는 기존 OpenAI 인스턴스를 사용할 수 있습니다.
const OpenAI = require ( 'openai' ) ;
const openai = new OpenAI ( { apiKey : 'your_api_key_here' } ) ;
const aiFunction = createAiFunctionInstance ( openai ) ;인스턴스가 있으면 옵션을 제공하여 AI 기능을 호출 할 수 있습니다.
const result = await aiFunction ( {
functionName : 'example_function' ,
model : 'gpt-4o' ,
args : { param1 : 'value1' , param2 : 'value2' } ,
description : 'This is an example function.' ,
outputSchema : {
type : "object" ,
properties : {
result : { type : "string" }
} ,
required : [ "result" ]
}
} ) ; aiFunction 다음 속성을 가진 옵션 객체를 취합니다.
| 옵션 | 유형 | 설명 | 기본 |
|---|---|---|---|
functionName | 끈 | AI 함수의 이름 | 'custom_function' |
args | 객체/문자열 | 기능에 대한 논증 | - |
description | 끈 | 기능의 목적에 대한 설명 | - |
outputSchema | 물체 | 예상 반환 유형 (JSON 스키마 또는 ZOD 스키마) | - |
strictReturn | 부울 | 엄격한 반환 유형 검증을 시행합니다 | true |
showDebug | 부울 | 디버그 정보를 콘솔에 인쇄하십시오 | false |
debugLevel | 숫자 | 디버그 정보 수준 (0-2) | 0 |
temperature | 숫자 | AI 모델의 샘플링 온도 | 0.6 |
frequency_penalty | 숫자 | AI 모델의 주파수 페널티 | 0 |
presence_penalty | 숫자 | AI 모델에 대한 존재 페널티 | 0 |
model | 끈 | 사용할 AI 모델 | 'gpt-4o-mini' |
max_tokens | 숫자 | 생성 할 최대 토큰 수 | 1000 |
top_p | 숫자 | AI 모델의 상위 P 값 | null |
blockHijack | 부울 | 신속한 납치 방지 | false |
blockHijackThrowError | 부울 | 납치 시도에 오류를 던지십시오 | false |
tools | 정렬 | 주 기능 내에서 사용할 수있는 기능 | [] |
stream | 부울 | 응답 스트리밍을 활성화합니다 | false |
streamCallback | 기능 | 스트리밍 된 응답에 대한 콜백 | null |
promptVars | 물체 | 프롬프트에 사용할 변수 | {} |
images | 문자열/배열 | 비전 모델의 이미지 URL | null |
imageQuality | 끈 | 비전 모델의 이미지 품질 | 'low' |
minifyJSON | 부울 | JSON 출력을 조정하십시오 | false |
history | 정렬 | 맥락을위한 대화 역사 | [] |
forceJsonMode | 부울 | 비 JSON 모델의 JSON 모드를 강제로 강제로합니다 | false |
timeout | 숫자 | API 통화 타임 아웃 (밀리 초) | 120000 |
maxRetries | 숫자 | API 호출에 대한 최대 검색 수 | 0 |
includeThinking | 부울 | 디버그 출력에 AI의 사고 과정을 포함하십시오 | false |
OutputSchema : JSON 스키마 또는 ZOD 스키마를 사용하여 AI 함수 출력의 예상 구조를 정의합니다. 따라서 AI 모델은 응용 프로그램이 예상하는 형식으로 데이터를 반환합니다.
도구 : 메인 AI 기능 내에서 사용할 수있는 헬퍼 기능 배열. 각 도구는 name , function_call , description 및 parameters 속성을 가진 객체입니다.
Blockhijack : 활성화되면이 기능은 AI 모델이 기능의 의도 된 동작을 무시하려는 사용자 메시지의 다음 지침을 방지하지 못하게합니다.
PromptVars : 기능 설명에서 대체 될 변수를 정의 할 수 있으므로 신속한 엔지니어링에서 더 많은 유연성을 제공합니다.
이미지 : 비전 가능 모델에 이미지 입력을 사용하여 AI가 수행 할 수있는 작업 유형을 확장 할 수 있습니다.
독립형 : true 로 설정하면이 옵션에는 디버그 출력에 AI의 사고 과정이 포함되어 AI가 결론에 도달하는 방법에 대한 통찰력을 제공합니다. 이것은 복잡한 문제 해결 작업 및 디버깅에 특히 유용합니다.
includeThinking 옵션을 사용하면 최종 출력을 생성하기 전에 AI의 사고 과정을 캡처 할 수 있습니다. 이 기능은 몇 가지 이점을 제공합니다.
응답 품질 향상 : 응답하기 전에 "생각"함으로써 AI는 생각을 구성하고보다 일관되고 잘 구조화 된 답변을 제공 할 수 있습니다.
투명성 : AI의 응답 뒤에있는 추론을 볼 수 있으며, 이는 AI가 어떻게 결론에 도달하는지 디버깅하고 이해하는 데 유용합니다.
디버깅 보조금 : 미세 조정 프롬프트 또는 예기치 않은 출력 문제 해결시 사고 과정은 매우 중요 할 수 있습니다.
활성화되면 AI의 사고 과정이 디버그 출력에 포함되어 있지만 최종 결과의 일부로 반환되지 않습니다. 사용 방법은 다음과 같습니다.
const options = {
functionName : 'complex_calculation' ,
args : { expression : '15*87 + ( 129/ (48*0.5) ) +12' } ,
description : 'Perform a complex mathematical calculation and show the steps.' ,
outputSchema : {
type : "object" ,
properties : {
result : { type : "number" }
} ,
required : [ "result" ]
} ,
includeThinking : true ,
showDebug : true // Set this to true to see the thinking process in the console
} ;
const result = await aiFunction ( options ) ; 디버그 출력에서 <|start_of_thinking|> 및 <|end_of_thinking|> 태그에 포함 된 사고 프로세스가 표시됩니다. 예를 들어:
--- Thinking Process ---
To solve the expression '15*87 + ( 129/ (48*0.5) ) +12', I'll break it down into steps:
1. First, let's solve the parentheses:
(48*0.5) = 24
2. Now we can simplify the division:
129 / 24 = 5.375
3. Let's calculate 15*87:
15*87 = 1305
4. Now we have simplified the expression to:
1305 + 5.375 + 12
5. Let's add these numbers:
1305 + 5.375 = 1310.375
1310.375 + 12 = 1322.375
Therefore, the final result is 1322.375.
--- Parsed JSON Output ---
{
"result": 1322.375
}
사고 과정은 디버그 출력에서만 볼 수 있으며 반환 된 결과의 구조 또는 내용에 영향을 미치지 않습니다. 이 기능은 AI의 추론을 이해하면 더 나은 엔지니어링과 더 정확한 결과를 초래할 수있는 복잡한 작업에 특히 유용합니다.
이 예에서는 AI가 복잡한 계산을 관리 가능한 단계로 분류하여 결과를 쉽게 확인하고 문제 해결 방식을 이해하는 방법을 확인할 수 있습니다. 사고 과정에서 이러한 세부 수준은 디버깅, 교육 또는 결론에 도달하기위한 단계가 최종 답변 자체만큼 중요 할 때 특히 중요 할 수 있습니다.
실시간으로 응답을 처리 할 수있는 스트리밍 활성화 :
const options = {
// ... other options ...
stream : true ,
streamCallback : ( chunk ) => {
console . log ( 'Received chunk:' , chunk ) ;
}
} ; 스트리밍 기능을 사용하면 AI 응답을 실시간으로 처리 할 수 있으며, 이는 장기 실행 작업 또는 사용자에게 즉각적인 피드백을 제공 할 때 특히 유용 할 수 있습니다. streamCallback 에서 stream 옵션을 사용하는 방법의 예는 다음과 같습니다.
const { createAiFunctionInstance } = require ( 'ai-function-helper' ) ;
const aiFunction = createAiFunctionInstance ( 'your_api_key_here' ) ;
async function generateStory ( ) {
let story = '' ;
const options = {
functionName : 'generate_story' ,
model : 'gpt-4o' ,
args : {
theme : 'space exploration' ,
length : 'short'
} ,
description : 'Generate a short story about space exploration.' ,
// We don't use 'outputSchema' to return a text instead of a JSON
stream : true ,
streamCallback : ( chunk ) => {
const content = chunk . choices [ 0 ] ?. delta ?. content ;
if ( content ) {
story += content ;
console . log ( 'Received chunk:' , content ) ;
// You can update your UI here with the new content
}
}
} ;
try {
const result = await aiFunction ( options ) ;
// The result here will be the complete response
console . log ( 'Final story:' , story ) ;
return story ;
} catch ( error ) {
console . error ( 'Error generating story:' , error ) ;
}
}
generateStory ( ) ;이 예에서 :
stream: true 설정합니다.streamCallback 함수를 제공합니다.이 접근법은 AI의 응답을 실시간으로 처리 할 수 있으며, 이는 다음에 도움이 될 수 있습니다.
스트리밍을 사용할 때는 aiFunction 에 의해 반환 된 최종 결과가 완전한 응답이므로 필요한 경우에도 사용할 수 있습니다.
메인 AI 기능 내에서 사용할 헬퍼 함수 정의 :
const options = {
// ... other options ...
tools : [
{
name : "generate_password" ,
function_call : ( { length = 5 , passwordCount = 1 } ) => {
// Password generation logic here
} ,
description : "Generate a random password" ,
parameters : {
type : "object" ,
properties : {
length : { type : "integer" } ,
passwordCount : { type : "integer" }
}
}
}
]
} ;신속한 납치에 대한 보호 기능 :
const options = {
// ... other options ...
blockHijack : true ,
blockHijackThrowError : true // Optional: throw error instead of returning a message
} ;비전에 사용할 수있는 모델의 경우 이미지 입력을 포함시킬 수 있습니다.
const options = {
// ... other options ...
images : 'https://example.com/image.jpg' ,
// Or
images : [ 'https://example.com/image1.jpg' , 'https://example.com/image2.jpg' ] ,
imageQuality : 'high'
} ;이전 상호 작용에서 컨텍스트 제공 :
const options = {
// ... other options ...
history : [
{ role : "user" , content : "What's the weather like?" } ,
{ role : "assistant" , content : "I'm sorry, but I don't have access to real-time weather information. Is there anything else I can help you with?" }
]
} ; 다음은 aiFunction 모듈의 다양성과 힘을 보여주는 몇 가지 매력적인 예입니다.
const options = {
functionName : 'generate_quiz' ,
model : 'gpt-4o' ,
args : { topic : 'space exploration' , difficulty : 'medium' , num_questions : 2 } ,
description : 'Generate a quiz with multiple-choice questions on the given topic.' ,
outputSchema : {
type : "array" ,
items : {
type : "object" ,
properties : {
question : { type : "string" } ,
options : {
type : "array" ,
items : { type : "string" } ,
minItems : 4 ,
maxItems : 4
} ,
correct_answer : { type : "string" }
} ,
required : [ "question" , "options" , "correct_answer" ]
}
}
} ;
const quiz = await aiFunction ( options ) ;
console . log ( JSON . stringify ( quiz , null , 2 ) ) ;예상 출력 :
[
{
"question" : " Which space agency launched the first artificial satellite, Sputnik 1? " ,
"options" : [
" NASA " ,
" Soviet Union " ,
" European Space Agency " ,
" China National Space Administration "
],
"correct_answer" : " Soviet Union "
},
{
"question" : " What year did the Apollo 11 mission successfully land humans on the Moon? " ,
"options" : [
" 1967 " ,
" 1969 " ,
" 1971 " ,
" 1973 "
],
"correct_answer" : " 1969 "
}
] const { z } = require ( 'zod' ) ;
const options = {
functionName : 'create_recipe' ,
model : 'gpt-4o' ,
args : { cuisine : 'Italian' , main_ingredient : 'pasta' , dietary_restriction : 'vegetarian' } ,
description : 'Create a recipe based on the given cuisine, main ingredient, and dietary restriction.' ,
outputSchema : z . object ( {
name : z . string ( ) ,
ingredients : z . array ( z . string ( ) ) ,
instructions : z . array ( z . string ( ) ) ,
prep_time : z . string ( ) ,
cook_time : z . string ( ) ,
servings : z . number ( ) . int ( )
} )
} ;
const recipe = await aiFunction ( options ) ;
console . log ( JSON . stringify ( recipe , null , 2 ) ) ;예상 출력 :
{
"name" : " Vegetarian Pasta Primavera " ,
"ingredients" : [
" 12 oz penne pasta " ,
" 2 cups mixed vegetables (bell peppers, zucchini, carrots) " ,
" 1/4 cup olive oil " ,
" 3 cloves garlic, minced " ,
" 1/2 cup grated Parmesan cheese " ,
" 1/4 cup fresh basil, chopped " ,
" Salt and pepper to taste "
],
"instructions" : [
" Cook pasta according to package instructions. Reserve 1/2 cup pasta water. " ,
" In a large skillet, heat olive oil over medium heat. Add minced garlic and sauté for 1 minute. " ,
" Add mixed vegetables to the skillet and cook for 5-7 minutes until tender-crisp. " ,
" Drain pasta and add it to the skillet with vegetables. Toss to combine. " ,
" Add Parmesan cheese, basil, and pasta water as needed to create a light sauce. " ,
" Season with salt and pepper to taste. Serve hot. "
],
"prep_time" : " 15 minutes " ,
"cook_time" : " 20 minutes " ,
"servings" : 4
} const options = {
functionName : 'analyze_reviews' ,
model : 'gpt-4o' ,
args : {
reviews : [
"The product exceeded my expectations. Great value for money!" ,
"Disappointed with the quality. Wouldn't recommend." ,
"Average product, nothing special but does the job."
]
} ,
description : 'Analyze the sentiment of customer reviews and categorize them.' ,
outputSchema : {
type : "array" ,
items : {
type : "object" ,
properties : {
review : { type : "string" } ,
sentiment : { type : "string" , enum : [ "positive" , "neutral" , "negative" ] } ,
score : { type : "number" , minimum : 0 , maximum : 1 }
} ,
required : [ "review" , "sentiment" , "score" ]
}
}
} ;
const sentiment_analysis = await aiFunction ( options ) ;
console . log ( JSON . stringify ( sentiment_analysis , null , 2 ) ) ;예상 출력 :
[
{
"review" : " The product exceeded my expectations. Great value for money! " ,
"sentiment" : " positive " ,
"score" : 0.9
},
{
"review" : " Disappointed with the quality. Wouldn't recommend. " ,
"sentiment" : " negative " ,
"score" : 0.2
},
{
"review" : " Average product, nothing special but does the job. " ,
"sentiment" : " neutral " ,
"score" : 0.5
}
] const { z } = require ( 'zod' ) ;
const options = {
functionName : 'create_travel_itinerary' ,
model : 'gpt-4o' ,
args : { destination : 'Tokyo' , duration : 3 , interests : [ 'technology' , 'culture' , 'food' ] } ,
description : 'Create a daily travel itinerary for the specified destination and duration, considering the traveler's interests.' ,
outputSchema : z . object ( {
destination : z . string ( ) ,
duration : z . number ( ) . int ( ) ,
daily_plans : z . array ( z . object ( {
day : z . number ( ) . int ( ) ,
activities : z . array ( z . object ( {
time : z . string ( ) ,
activity : z . string ( ) ,
description : z . string ( )
} ) )
} ) )
} )
} ;
const itinerary = await aiFunction ( options ) ;
console . log ( JSON . stringify ( itinerary , null , 2 ) ) ;예상 출력 :
{
"destination" : " Tokyo " ,
"duration" : 3 ,
"daily_plans" : [
{
"day" : 1 ,
"activities" : [
{
"time" : " 09:00 " ,
"activity" : " Visit Akihabara " ,
"description" : " Explore the technology and electronics district, known for its gadgets and anime culture. "
},
{
"time" : " 13:00 " ,
"activity" : " Lunch at a Robot Restaurant " ,
"description" : " Experience a unique dining experience with robot performances. "
},
{
"time" : " 15:00 " ,
"activity" : " Tour the Miraikan Science Museum " ,
"description" : " Discover cutting-edge technology and scientific innovations at this interactive museum. "
}
]
},
{
"day" : 2 ,
"activities" : [
{
"time" : " 10:00 " ,
"activity" : " Visit Senso-ji Temple " ,
"description" : " Explore Tokyo's oldest Buddhist temple and experience traditional Japanese culture. "
},
{
"time" : " 14:00 " ,
"activity" : " Tea Ceremony in Hamarikyu Gardens " ,
"description" : " Participate in a traditional Japanese tea ceremony in a beautiful garden setting. "
},
{
"time" : " 18:00 " ,
"activity" : " Dinner at Tsukiji Outer Market " ,
"description" : " Enjoy fresh sushi and local delicacies at the world-famous fish market area. "
}
]
},
{
"day" : 3 ,
"activities" : [
{
"time" : " 09:00 " ,
"activity" : " Visit teamLab Borderless " ,
"description" : " Immerse yourself in a digital art museum that blends technology and creativity. "
},
{
"time" : " 13:00 " ,
"activity" : " Ramen Tour in Shinjuku " ,
"description" : " Sample various styles of ramen at some of Tokyo's best ramen shops. "
},
{
"time" : " 16:00 " ,
"activity" : " Shopping in Ginza " ,
"description" : " Explore high-end technology stores and experience Japanese retail innovation. "
}
]
}
]
} const options = {
functionName : 'analyze_stock' ,
model : 'gpt-4o' ,
args : { symbol : 'AAPL' , timeframe : '1 year' } ,
description : 'Analyze the stock performance and provide insights based on the given symbol and timeframe.' ,
outputSchema : {
type : "object" ,
properties : {
symbol : { type : "string" } ,
currentPrice : { type : "number" } ,
yearlyPerformance : { type : "number" } ,
technicalIndicators : {
type : "object" ,
properties : {
RSI : { type : "number" } ,
MACD : {
type : "object" ,
properties : {
value : { type : "number" } ,
signal : { type : "number" } ,
histogram : { type : "number" }
} ,
required : [ "value" , "signal" , "histogram" ]
}
} ,
required : [ "RSI" , "MACD" ]
} ,
recommendation : { type : "string" , enum : [ "Buy" , "Hold" , "Sell" ] }
} ,
required : [ "symbol" , "currentPrice" , "yearlyPerformance" , "technicalIndicators" , "recommendation" ]
}
} ;
const stockAnalysis = await aiFunction ( options ) ;
console . log ( JSON . stringify ( stockAnalysis , null , 2 ) ) ;예상 출력 :
{
"symbol" : " AAPL " ,
"currentPrice" : 178.25 ,
"yearlyPerformance" : 0.35 ,
"technicalIndicators" : {
"RSI" : 62.5 ,
"MACD" : {
"value" : 2.1 ,
"signal" : 1.8 ,
"histogram" : 0.3
}
},
"recommendation" : " Buy "
} 이 예는 콘텐츠 생성에서 데이터 분석에 이르기까지 다양한 작업에 AI 기능 도우미를 사용하는 방법을 보여줍니다. 각 예제에는 상세한 outputSchema 스키마 (JSON 스키마와 ZOD 형식을 교대)가 포함되어 AI 모델의 구조화 및 검증 된 출력을 보장합니다.
특정 기능 이름 사용 : AI가 컨텍스트를 이해하도록 돕기 위해 명확하고 설명적인 기능 이름을 선택하십시오.
자세한 설명 제공 : 설명에서 더 많은 맥락을 제공할수록 AI가 더 잘 이해하고 수행 할 수 있습니다.
정확한 반환 스키마 정의 : 세부적인 outputSchema 스키마를 사용하여 필요한 정확한 데이터 구조를 얻으십시오.
복잡한 작업을위한 도구 활용 : 특정 계산 또는 외부 데이터가 필요한 작업의 경우 이러한 측면을 처리하기 위해 사용자 정의 도구를 정의하십시오.
오류를 우아하게 처리하십시오 : 트리 캐치 블록을 사용하고 강력한 오류 처리를 위해 적절한 시간 초과 및 재 시도 값을 설정하는 것을 고려하십시오.
토큰 사용에 대한 최적화 : 프롬프트의 길이를 염두에두고 큰 출력을 위해 minifyJSON 사용하여 토큰 소비를 줄입니다.
긴 응답을 위해 스트리밍 사용 : 긴 응답을 생성 할 수있는 작업의 경우 스트리밍 옵션을 사용하여 응답을 실시간으로 처리하십시오.
대화 기록 활용 : 다중 회전 상호 작용의 경우 history 옵션을 사용하여 이전 교환의 컨텍스트를 제공하십시오.
Q :이 모듈을 다른 AI 제공 업체와 함께 사용할 수 있습니까? A : 현재 AI 기능 도우미는 OpenAI의 모델과 함께 작동하도록 설계되었습니다. 다른 공급자에 대한 지원은 향후 버전으로 추가 될 수 있습니다.
Q : 예상 출력이 없으면 어떻게 디버그 할 수 있습니까? A : showDebug: true 설정하고 debugLevel 조정하여 디버깅을 활성화합니다. API 호출 및 응답에 대한 자세한 정보가 제공됩니다.
Q :이 모듈은 생산 사용에 적합합니까? A : 그렇습니다. 그러나 항상 OpenAI에서 설정 한 적절한 오류 처리 및 존중 요율 제한이 있는지 확인하십시오.
Q : 많은 양의 데이터를 스트리밍하는 데 사용할 수 있습니까? A : 예, 큰 응답을 효율적으로 처리하기 위해 stream 옵션을 사용할 수 있습니다.
Q : 모듈은 API 키를 어떻게 안전하게 처리합니까? A : 모듈은 API 키 저장소 또는 보안을 처리하지 않습니다. 인스턴스를 만들 때 API 키를 안전하게 관리하고 제공하는 것은 귀하의 책임입니다.
우리는 다양한 AI 모델에 대한 광범위한 테스트를 수행하여 특정 형식을 준수하면서 다양한 복잡성의 JSON 출력을 생성하는 능력을 평가했습니다. 이 테스트는 다양한 AI 모델에서 AI 기능 도우미 모듈의 다양성과 신뢰성을 보여줍니다.
OpenAI에서 직접 제공하지 않은 모델을 포함하여 광범위한 AI 모델에서 포괄적 인 테스트를 보장하기 위해 Litellm을 프록시로 사용했습니다. Litellm은 다양한 AI 제공 업체 및 로컬 모델 (Ollama를 통해)에게 통합 인터페이스를 제공하는 강력한 도구입니다. 이 접근법을 통해 AI 기능 도우미와 여러 AI 모델을 원활하게 통합하고 테스트하여 유연성과 광범위한 호환성을 보여줍니다.
| 모델 | 성공률 | 평균 기간 |
|---|---|---|
| 불꽃 놀이/llama-v3p1-405b-비축 | 100.00% | 16887.67ms |
| Groq/llama-3.1-70b versatile | 100.00% | 2154.89ms |
| Claude-3-Haiku-20240307 | 100.00% | 3175.72ms |
| GPT-3.5 터보 | 88.89% | 3398.67ms |
| GPT-4O- 미니 | 100.00% | 5699.72ms |
| GPT-4O | 100.00% | 5673.00ms |
| Claude-3-5-Sonnet-20240620 | 100.00% | 5940.50ms |
| Gemini-1.5-Flash | 88.89% | 5150.00ms |
| Gemini-1.5-Pro | 100.00% | 10066.06ms |
| Gemma2 : 9B (Ollama) | 100.00% | 13368.94ms |
테스트는 간단한 계산에서 복잡한 데이터 생성 및 분석에 이르기까지 광범위한 기능을 다룹니다. 테스트 카테고리 중 일부는 다음과 같습니다.
각 테스트 사례 및 모델 성능의 자세한 결과는 다음 파일을 참조하십시오.
직접 테스트를 실행하거나 개선에 기여하려면 GitHub 저장소에서 테스트 스크립트를 찾을 수 있습니다.
이러한 테스트는 AI 기능 도우미의 다양한 AI 모델과 협력하고 광범위한 작업 복잡성을 처리 할 수있는 기능을 보여줍니다. 또한 모듈의 구조화 된 출력을 시행하는 기능을 보여 주어 AI 생성 컨텐츠를 응용 프로그램에 쉽게 통합 할 수 있습니다.
일부 테스트는 "어리석게"복잡하며 AI 모델의 한계를 넓히도록 설계되었습니다. 이러한 테스트는 실용적이 아니라 AI 기능 도우미의 도전적인 시나리오를 처리 할 수있는 능력을 보여주기위한 것입니다. 실패한 테스트의 대부분은 AI 모델에 더 많은 컨텍스트를 제공하거나 입력 프롬프트를 정제하여 성공적으로 완료 할 수 있습니다.
Litellm을 활용하여 OpenAI 모델 이외의 AI 기능 도우미의 호환성을 확장하여 사용자가 다양한 AI 제공 업체 및 로컬 모델을 사용하면서 일관된 인터페이스를 유지할 수 있습니다. 이 접근 방식은 도구의 적용 가능성을 넓힐뿐만 아니라 사용자에게 특정 요구와 제약에 가장 적합한 AI 모델을 선택할 때 유연성을 높이게합니다.
기부금을 환영합니다! 기여하고 싶다면 저장소를 포크하고 기능 분기를 사용하십시오. 풀 요청을 따뜻하게 환영합니다.
AI 기능 도우미는 MIT 라이센스에 따라 라이센스가 부여 된 오픈 소프트웨어입니다.