Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4cbd5c3
Merge tag '0.30.5' into develop
intitni Feb 22, 2024
9de4774
Add ResponseStream
intitni Mar 1, 2024
99dbf8f
Move definitions to CompletionsAPIDefinition
intitni Mar 1, 2024
1b213af
Rename file
intitni Mar 1, 2024
fd7f92d
Rename types
intitni Mar 1, 2024
d3c02a1
Convert API types to OpenAIService
intitni Mar 1, 2024
6d6fc49
Convert API types to GoogleAIService
intitni Mar 1, 2024
d741333
Reset ChatCompletionsStreamAPI to return AsyncThrowingStream
intitni Mar 1, 2024
16a770e
Add UI for ollama models
intitni Mar 1, 2024
ef6dd45
Implement Ollama non stream chat API
intitni Mar 1, 2024
58483b0
Update
intitni Mar 1, 2024
ed811e8
Add OpenAIEmbeddingService
intitni Mar 1, 2024
9f137ee
Add OllamaEmbeddingService
intitni Mar 1, 2024
6282aa1
Update test success message
intitni Mar 1, 2024
96bf018
Change Max Tokens to Context Window for better clearity
intitni Mar 2, 2024
7bc8ea7
Merge branch 'feature/ollama-support' into develop
intitni Mar 2, 2024
37111d2
Update
intitni Mar 2, 2024
ecf740e
Migrate service specific info to their own structs
intitni Mar 2, 2024
42a8efb
Support tool call
intitni Mar 2, 2024
c962212
Remove function role
intitni Mar 2, 2024
a412c23
Move tool call responses into its source assistant message
intitni Mar 3, 2024
ca9e981
Use ResponseStream to handle stream responses
intitni Mar 3, 2024
21d7ae4
Put tool call responses into the tool call struct
intitni Mar 3, 2024
143a92f
Parse Mistral.AI errors
intitni Mar 3, 2024
ef396be
Remove useless fields
intitni Mar 3, 2024
2ad4e6d
Remove tool calling content if function calling is not supported
intitni Mar 3, 2024
36f51bb
Fix unit test
intitni Mar 3, 2024
d0102f8
Remove `id` from ToolCallResponse
intitni Mar 3, 2024
21d5d68
Fix error decoding
intitni Mar 3, 2024
0dccd99
Merge branch 'feature/update-openai-api-to-latest-format' into develop
intitni Mar 3, 2024
e9b88b7
Remove warnings
intitni Mar 3, 2024
f2ed55d
Fix function calling settings for ollama
intitni Mar 3, 2024
84058ec
Update
intitni Mar 3, 2024
59ed0da
Merge branch 'main' into develop
intitni Mar 3, 2024
5927fff
Merge tag '0.31.0.beta' into develop
intitni Mar 4, 2024
6063d41
Give response role the default value `assistant`
intitni Mar 4, 2024
01c7cad
Merge branch 'feature/role-fallback-for-bad-stream-response' into dev…
intitni Mar 4, 2024
6fb6360
Hide the circle when Xcode is not active
intitni Mar 6, 2024
d6afaab
Update
intitni Mar 6, 2024
a9b25c8
Bump Copilot.vim to 1.25.0
intitni Mar 7, 2024
8808b47
Merge branch 'feature/bump-github-copilot-1.25.0' into develop
intitni Mar 7, 2024
1285933
Bump Codeium language server to 1.8.5
intitni Mar 7, 2024
cf54d2a
Merge branch 'feature/bump-codeium-language-server-to-1.8.5' into dev…
intitni Mar 7, 2024
6f8091b
Bump version to 0.31.0
intitni Mar 4, 2024
a1604dd
Update appcast.xml
intitni Mar 8, 2024
7e91a10
Merge branch 'release/0.31.0'
intitni Mar 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove id from ToolCallResponse
  • Loading branch information
intitni committed Mar 3, 2024
commit d0102f8be65995afa99577e7ee8dc6b4166ccf65
2 changes: 1 addition & 1 deletion Core/Sources/ChatGPTChatTab/Chat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ struct Chat: ReducerProtocol {

for call in message.toolCalls ?? [] {
all.append(.init(
id: message.id + call.response.id,
id: message.id + call.id,
role: .tool,
text: call.response.summary ?? call.response.content,
references: []
Expand Down
2 changes: 1 addition & 1 deletion Tool/Sources/OpenAIService/ChatGPTService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ extension ChatGPTService {
all.append(ChatCompletionsRequestBody.Message(
role: .tool,
content: call.response.content,
toolCallId: call.response.id
toolCallId: call.id
))
} else {
all.append(ChatCompletionsRequestBody.Message(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extension TokenEncoder {
encodingContent.append(toolCall.function.arguments)
total += 4
encodingContent.append(toolCall.response.content)
encodingContent.append(toolCall.response.id)
encodingContent.append(toolCall.id)
}
}
total += await withTaskGroup(of: Int.self, body: { group in
Expand Down
6 changes: 2 additions & 4 deletions Tool/Sources/OpenAIService/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ public struct ChatMessage: Equatable, Codable {
self.id = id
self.type = type
self.function = function
self.response = response ?? .init(id: id, content: "", summary: nil)
self.response = response ?? .init(content: "", summary: nil)
}
}

public struct ToolCallResponse: Codable, Equatable {
public var id: String
public var content: String
public var summary: String?
public init(id: String, content: String, summary: String?) {
self.id = id
public init(content: String, summary: String?) {
self.content = content
self.summary = summary
}
Expand Down
10 changes: 5 additions & 5 deletions Tool/Tests/OpenAIServiceTests/ChatGPTStreamTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ final class ChatGPTStreamTests: XCTestCase {
id: "id",
type: "function",
function: .init(name: "function", arguments: "{\n\"foo\": 1\n}"),
response: .init(id: "id", content: "Function is called.", summary: nil)
response: .init(content: "Function is called.", summary: nil)
),
]
),
Expand Down Expand Up @@ -254,19 +254,19 @@ final class ChatGPTStreamTests: XCTestCase {
id: "id",
type: "function",
function: .init(name: "function", arguments: "{\n\"foo\": 1\n}"),
response: .init(id: "id", content: "Function is called.", summary: nil)
response: .init(content: "Function is called.", summary: nil)
),
.init(
id: "id2",
type: "function",
function: .init(name: "function", arguments: "{\n\"foo\": 1\n}"),
response: .init(id: "id2", content: "Function is called.", summary: nil)
response: .init(content: "Function is called.", summary: nil)
),
.init(
id: "id3",
type: "function",
function: .init(name: "function", arguments: "{\n\"foo\": 1\n}"),
response: .init(id: "id3", content: "Function is called.", summary: nil)
response: .init(content: "Function is called.", summary: nil)
),
]
),
Expand Down Expand Up @@ -360,7 +360,7 @@ final class ChatGPTStreamTests: XCTestCase {
id: "id",
type: "function",
function: .init(name: "function", arguments: "{\n\"foo\": 1\n}"),
response: .init(id: "id", content: "Function is called.", summary: nil)
response: .init(content: "Function is called.", summary: nil)
),
]
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ReformatPromptToBeGoogleAICompatibleTests: XCTestCase {
id: "id",
type: "function",
function: .init(name: "ping", arguments: "{ \"ip\": \"127.0.0.1\" }"),
response: .init(id: "id", content: "42ms", summary: nil)
response: .init(content: "42ms", summary: nil)
),
]
),
Expand Down