-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenAIService - new functions/endpoints - retrieveAssistantFile
The wrapped API: GET https://api.openai.com/v1/assistants/{assistant_id}/files/{file_id}
- Loading branch information
1 parent
53efd2d
commit a80220d
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
17 changes: 17 additions & 0 deletions
17
openai-examples/src/main/scala/io/cequence/openaiscala/examples/RetrieveAssistantFile.scala
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.cequence.openaiscala.examples | ||
|
||
import scala.concurrent.Future | ||
|
||
object RetrieveAssistantFile extends Example { | ||
|
||
override protected def run: Future[_] = | ||
for { | ||
assistant <- service.retrieveAssistantFile( | ||
assistantId = "asst_Btbc2h7dqyDU52g1KfBa2XE8", | ||
fileId = "file_2bX" | ||
) | ||
} yield { | ||
println(assistant) | ||
} | ||
|
||
} |