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

High Open AI Request Count & Token usage #1103

Open
codedash07 opened this issue Sep 16, 2024 · 0 comments
Open

High Open AI Request Count & Token usage #1103

codedash07 opened this issue Sep 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@codedash07
Copy link

codedash07 commented Sep 16, 2024

Hello There,

This may not be specifically a bug, but there seems to be some issue.
For a single chat request sent from bot UI, metrics report that 3 or 3x Open AI requests were made. Also the token usage is quite high (3 times than the expected token count).
I am using AI Search Index as data source for chatbot.

I am using default settings mostly, below is the configuration JSON being sent to the model at the time of invocation.

{'messages': [{'role': 'user', 'content': 'what can you answer?'}], 'temperature': 0.0, 'max_tokens': 4096, 'top_p': 1.0, 'stop': None, 'stream': True, 'model': 'gpt4o', 'user': '{"EndUserId": "00000000-0000-0000-0000-000000000000", "EndUserIdType": "EntraId", "SourceIp": "127.0.0.1"}', 'extra_body': {'data_sources': [{'type': 'azure_search', 'parameters': {'top_n_documents': 1, 'strictness': 1, 'in_scope': True, 'index_name': 'vector-1718086437222', 'semantic_configuration': 'vector-1718086437222-semantic-configuration', 'query_type': 'vector_simple_hybrid', 'endpoint': '
https://instance.search.windows.net'
, 'authentication': {'type': 'api_key', 'key': 'abc21321abc'}, 'embedding_dependency': {'type': 'deployment_name', 'deployment_name': 'text-embedding-ada-002'}, 'fields_mapping': {'content_fields': ['chunk'], 'title_field': 'chunk_id', 'url_field': 'metadata_storage_path', 'filepath_field': 'title', 'vector_fields': ['text_vector']}, 'allow_partial_result': False, 'include_contexts': ['citations', 'intent'], 'role_information': "You are a professional AI support assistant."}}]}}

What could be the possible fix to this problem.
Thank in advance!!!

@codedash07 codedash07 added the bug Something isn't working label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant