Chat demo App: How to fetch function arguments on the view?
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reading the Chat demo’s message model and view, especially the case .function rendering shown in the issue, then trace where function-call arguments are stored in the Swift package. The request is to make individual arguments available to the view for uses such as tables or graphs; done means the demo can access a requested property such as degrees. The issue has had no comment for 529 days, so confirm the approach with maintainers before starting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem? Please describe.
Would be great to be able to fetch function arguments on the view.
Describe the solution you'd like
When defined:
let weatherFunction = ChatFunctionDeclaration(
name: "getWeatherData",
description: "Get the current weather in a given location",
parameters: .init(
type: .object,
properties: [
"location": .init(type: .string, description: "The city and state, e.g. San Francisco, CA"),
"degrees": .init(type: .string, description: "The degrees, in celsius. Ex: 10c")
],
required: ["location"]
)
)
When prompted "show me the weather in San Francisco"...
Current demo app shows the on the bubble: message.content
Would be great to be able to fetch the property, ex: function.degrees.
This would enable to place specific function properties on tables, graphs, etc...
var body: some View {
HStack {
switch message.role {
case .assistant:
Text(message.content)
.padding(.horizontal, 16)
.padding(.vertical, 12)
.background(assistantBackgroundColor)
.clipShape(RoundedRectangle(cornerRadius: 16, style: .continuous))
Spacer(minLength: 24)
case .user:
Spacer(minLength: 24)
Text(message.content)
.padding(.horizontal, 16)
.padding(.vertical, 12)
.foregroundColor(userForegroundColor)
.background(userBackgroundColor)
.clipShape(RoundedRectangle(cornerRadius: 16, style: .continuous))
case .function:
Text(message.content)
.font(.footnote.monospaced())
.padding(.horizontal, 16)
.padding(.vertical, 12)
.background(funcBackgroundColor)
.clipShape(RoundedRectangle(cornerRadius: 16, style: .continuous))
Spacer(minLength: 24)
case .system:
EmptyView()
}
}
}
- Lingua principale
- Swift
- Stelle
- 2.9k
- Fork
- 519
- Merge medio
- 4g 9h
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MacPaw/OpenAI
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 3 giorni
-
Enable batch promptsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
MacPaw/OpenAI#73 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
-
Check the HTTP status code for JSON responsesForse già presa @mvanhorn l’ha presa 2 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
MacPaw/OpenAI#469 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 3 giorni
-
Add Batch API supportAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di MacPaw/OpenAI
Issue simili
-
binding:web core docs p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
RunanywhereAI/runanywhere-sdks#1123 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
Countly/countly-sdk-ios#485 ·
I maintainer di solito rispondono entro 1 giorno
-
area:ui enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
s3onghyun/bulchimbeon#22 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno