-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Chat Completions] Request payload definition #21 #263
Draft
jihyunmoon16
wants to merge
7
commits into
aliencube:main
Choose a base branch
from
jihyunmoon16:feature/22-request-payload-definition
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[Chat Completions] Request payload definition #21 #263
jihyunmoon16
wants to merge
7
commits into
aliencube:main
from
jihyunmoon16:feature/22-request-payload-definition
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@jihyunmoon16 아까 낮에 논의한 것 처럼
|
테스트 코드 작성했는데 data_sources 필드는 다형성? 부분도 고려해야 할 것 같고 어떤식으로 클래스를 만들어야 할 지 고민입니다. 테스트도 계속 실패해요. 웹사이트의 examples json 파일을 참고해서 제일 기본인 required 필드만 적용해봤습니다. 코드 구현이 힘든 부분이 이 data sources 파라미터예요. "body": {
"messages": [
{
"role": "user",
"content": "can you tell me how to care for a cat?"
},
{
"role": "assistant",
"content": "Content of the completion [doc1].",
"context": {
"intent": "cat care"
}
},
{
"role": "user",
"content": "how about dog?"
}
],
"data_sources": [
{
"type": "azure_search",
"parameters": {
"endpoint": "https://your-search-endpoint.search.windows.net/",
"authentication": {
"type": "user_assigned_managed_identity",
"managed_identity_resource_id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resource-name}"
},
"index_name": "{index name}",
"query_type": "vector",
"embedding_dependency": {
"type": "deployment_name",
"deployment_name": "{embedding deployment name}"
},
"in_scope": true,
"top_n_documents": 5,
"strictness": 3,
"role_information": "You are an AI assistant that helps people find information.",
"fields_mapping": {
"content_fields_separator": "\\n",
"content_fields": [
"content"
],
"filepath_field": "filepath",
"title_field": "title",
"url_field": "url",
"vector_fields": [
"contentvector"
]
}
}
}
]
} 테스트 코드를 작성하다가 궁금한 부분이 있는데 createChatCompletionRequest의 경우 request payload 여서 비직렬화만 할 것 같은데 이때도 직렬화 테스트가 필요할까요? |
…b.com/jihyunmoon16/azure-openai-sdk-proxy into feature/22-request-payload-definition
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CreateChatCompletionRequest
참고 링크: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2024-06-01/inference.json
CreateChatCompletionRequest
ChatCompletionsRequestCommon
ChatCompletionRequestMessage
ChatCompletionRequestMessageRole
ChatCompletionRequestMessageSystem
ChatCompletionRequestMessageUser
ChatCompletionRequestMessageContentPart
ChatCompletionRequestMessageAssistant
ChatCompletionRequestMessageTool
AzureChatExtensionConfiguration
AzureChatExtensionType
AzureSearchChatExtensionConfiguration
AzureCosmosDBChatExtensionConfiguration
AzureCosmosDBChatExtensionParameters
OnYourDataConnectionStringAuthenticationOptions
OnYourDataAuthenticationOptions
ChatCompletionResponseFormat
ChatCompletionTool
ChatCompletionToolType
ChatCompletionFunctionParameters
ChatCompletionToolChoiceOption
ChatCompletionNamedToolChoice