Skip to content

Commit

Permalink
chore: adds SPI badges (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhermawan authored Sep 28, 2024
1 parent a7981e7 commit fbb9451
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# LLMChatOpenAI

[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fkevinhermawan%2Fswift-llm-chat-openai%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/kevinhermawan/swift-llm-chat-openai) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fkevinhermawan%2Fswift-llm-chat-openai%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/kevinhermawan/swift-llm-chat-openai)

Interact with OpenAI and OpenAI-compatible chat completion APIs in a simple and elegant way.

### Overview
Expand Down Expand Up @@ -171,7 +173,7 @@ let options = ChatOptions(tools: [recommendBookTool])

Task {
do {
let completion = try await viewModel.chat.send(model: viewModel.selectedModel, messages: messages, options: options)
let completion = try await chat.send(model: "gpt-4o", messages: messages, options: options)

if let toolCalls = completion.choices.first?.message.toolCalls {
print(toolCalls.first?.function.arguments ?? "")
Expand Down Expand Up @@ -208,7 +210,7 @@ let options = ChatOptions(responseFormat: responseFormat)

Task {
do {
let completion = try await viewModel.chat.send(model: viewModel.selectedModel, messages: messages, options: options)
let completion = try await chat.send(model: "gpt-4o", messages: messages, options: options)

print(completion.choices.first?.message.content ?? "")
} catch {
Expand Down
4 changes: 2 additions & 2 deletions Sources/LLMChatOpenAI/Documentation.docc/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ let options = ChatOptions(tools: [recommendBookTool])

Task {
do {
let completion = try await viewModel.chat.send(model: viewModel.selectedModel, messages: messages, options: options)
let completion = try await chat.send(model: "gpt-4o", messages: messages, options: options)

if let toolCalls = completion.choices.first?.message.toolCalls {
print(toolCalls.first?.function.arguments ?? "")
Expand Down Expand Up @@ -181,7 +181,7 @@ let options = ChatOptions(responseFormat: responseFormat)

Task {
do {
let completion = try await viewModel.chat.send(model: viewModel.selectedModel, messages: messages, options: options)
let completion = try await chat.send(model: "gpt-4o", messages: messages, options: options)

print(completion.choices.first?.message.content ?? "")
} catch {
Expand Down

0 comments on commit fbb9451

Please sign in to comment.