You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created an assistant, noted the assistant ID. It has an attached file that is used for the file_search. I noted the file_id (starts with vs for a vector store)
The assistant works well on the playground as desired. I have a total of 2 user messages sent and 2 received back from OpenAi
I note the threadID on the playground (starts with thread_)
I use the latest library, with the support for Assistants V2 Beta
When I retrieve the thread & the message using the Open-Ai Orhanerday library, i don't see anything :-(
Same goes when I try to retrieve the files associated with the assistants. Please see below for the codes
Am I doing something wrong or are "files" not yet supported with the assistants V2 beta?
Thanks!
To Reproduce
List assistant files
`use Orhanerday\OpenAi\OpenAi;
try {
$open_ai = new OpenAi('my_API_KEY');
$open_ai->setAssistantsBetaVersion("v2");
@itscvenk I don't know about listing files, but listing messages should work just fine. In your example you are dumping $thread twice instead of $messages.
Describe the bug
I used the openAi API playground
I created an assistant, noted the assistant ID. It has an attached file that is used for the file_search. I noted the file_id (starts with vs for a vector store)
The assistant works well on the playground as desired. I have a total of 2 user messages sent and 2 received back from OpenAi
I note the threadID on the playground (starts with thread_)
I use the latest library, with the support for Assistants V2 Beta
When I retrieve the thread & the message using the Open-Ai Orhanerday library, i don't see anything :-(
Same goes when I try to retrieve the files associated with the assistants. Please see below for the codes
Am I doing something wrong or are "files" not yet supported with the assistants V2 beta?
Thanks!
To Reproduce
List assistant files
`use Orhanerday\OpenAi\OpenAi;
try {
$open_ai = new OpenAi('my_API_KEY');
$open_ai->setAssistantsBetaVersion("v2");
} catch (Exception $e) {
echo "Got Error!" . $e->getMessage() . " ";
}
//Results in empty files:
/* list of files
{
"object": "list",
"data": [],
"first_id": null,
"last_id": null,
"has_more": false
}
*/
`
retrieveThread & listThreadMessages
`$threadId = 'thread_ID_____________';
require ($home_dir . '/includes/vendor/autoload.php');
use Orhanerday\OpenAi\OpenAi;
include_once($siteConfig['htmlHeader']);
try {
} catch (Exception $e) {
echo "Got Error!" . $e->getMessage() . " ";
}
/* results in empty threads and empty messsages!
result of thread... is
{
"id": "thread_ID_____________",
"object": "thread",
"created_at": 1717219235,
"metadata": {},
"tool_resources": {
"code_interpreter": {
"file_ids": []
}
}
}
result of messages in thread thread_ID_____________ is
{
"id": "thread_ID_____________",
"object": "thread",
"created_at": 1717219235,
"metadata": {},
"tool_resources": {
"code_interpreter": {
"file_ids": []
}
}
}
*/`
OS
PHP Apache
PHP version
PHP Version 7.4.33
Library version
3.5 - 2023-02-10 latest version including V2 assistants Beta:
The text was updated successfully, but these errors were encountered: