Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage Details is not coming for OpenAiAssistantRunnable. #28929

Open
5 tasks done
Smit3949 opened this issue Dec 26, 2024 · 1 comment
Open
5 tasks done

Usage Details is not coming for OpenAiAssistantRunnable. #28929

Smit3949 opened this issue Dec 26, 2024 · 1 comment
Labels
investigate Flagged for investigation.

Comments

@Smit3949
Copy link

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangChain documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

OpenAIAssistantFinish(
                return_values={
                    "output": answer,
                    "thread_id": run.thread_id,
                    "run_id": run.id,
                },
                log="",
                run_id=run.id,
                thread_id=run.thread_id,
            ) 

this only return following fields, it should return usage details as well

Error Message and Stack Trace (if applicable)

No response

Description

I want to charge user on based on tokens and im using open ai assistant but its not returning usage details so even call backs does not have any usage details as well.

System Info

System Information

OS: Darwin
OS Version: Darwin Kernel Version 24.0.0: Mon Aug 12 20:54:26 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T8112
Python Version: 3.11.6 (v3.11.6:8b6ee5ba3b, Oct 2 2023, 11:18:21) [Clang 13.0.0 (clang-1300.0.29.30)]

Package Information

langchain_core: 0.3.18
langchain: 0.3.7
langchain_community: 0.3.7
langsmith: 0.1.142
langchain_chroma: 0.1.4
langchain_google_genai: 2.0.6
langchain_openai: 0.2.6
langchain_text_splitters: 0.3.2
langchain_unstructured: 0.1.5

Optional packages not installed

langgraph
langserve

Other Dependencies

aiohttp: 3.10.10
async-timeout: Installed. No version info available.
chromadb: 0.5.18
dataclasses-json: 0.6.7
fastapi: 0.115.5
filetype: 1.2.0
google-generativeai: 0.8.3
httpx: 0.27.0
httpx-sse: 0.4.0
jsonpatch: 1.33
numpy: 1.26.4
openai: 1.54.3
orjson: 3.10.11
packaging: 24.2
pydantic: 2.9.2
pydantic-settings: 2.6.1
PyYAML: 6.0.2
requests: 2.32.3
requests-toolbelt: 1.0.0
SQLAlchemy: 2.0.35
tenacity: 9.0.0
tiktoken: 0.8.0
typing-extensions: 4.12.2
unstructured-client: 0.25.9
unstructured[all-docs]: Installed. No version info available.

@langcarl langcarl bot added the investigate Flagged for investigation. label Dec 26, 2024
@Smit3949
Copy link
Author

Smit3949 commented Dec 26, 2024

Hey @hwchase17, @efriis could you please take a look at this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Flagged for investigation.
Projects
None yet
Development

No branches or pull requests

1 participant