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

urgent: together.ai api key incompatible with new code base updates #183

Closed
tan-banana opened this issue Mar 21, 2024 · 7 comments
Closed

Comments

@tan-banana
Copy link

tan-banana commented Mar 21, 2024

To reproduce the error, download the repo today and try to use together.ai as the llm. it will not work. this is due to recent changes made to the code. prior there was a loophole to use the openai key in the yaml as the api key (as together ai is meant to work).
like it goes ... open ai : 'together api key' but that doesnt work now.

I tried 100 ways. not a developer so I cant edit the main code successfully besides the variables. it seems like a structural issue a small change maybe.

Original error message:

[INFO] Speech To Text - Whisper using GPU: True
Traceback (most recent call last):

File "C:\Users\transcribeUpdated\app\transcribe\main.py", line 125, in
main()
File "C:\Users\transcribeUpdated\app\transcribe\main.py", line 68, in main
ui_components = ui.create_ui_components(root, config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\transcribeUpdated\app\transcribe\ui.py", line 494, in create_ui_components
if not utilities.is_api_key_valid(api_key=api_key, base_url=base_url):
^^^^^^^
UnboundLocalError: cannot access local variable 'api_key' where it is not associated with a value

@mang0sw33t
Copy link
Collaborator

create a section in override.yaml file as follows

Together:
  api_key: 'API_KEY'

@tan-banana
Copy link
Author

tan-banana commented Mar 21, 2024

This shouldnt work because the together api is supposed to be compatible with openai structure so you just put the together api in place of the open ai key, while changing the base model in the parameters.yaml and the gpt model name from together.ai.

this is how it worked in previous version:
OpenAI:
api_key: 'together api key'

parameter.yaml :
OpenAI:
api_key: 'API_KEY'
base_url: 'https://api.together.xyz/v1'

ai_model: together model

line 72 - ai_model: ' together model '
line 73 - base_url: 'https://api.together.xyz'

@tan-banana tan-banana changed the title I cannot get together.ai to work because it wants an api key and theres no where to put it. I cannot get together.ai to work because it wants an api key Mar 21, 2024
@tan-banana tan-banana changed the title I cannot get together.ai to work because it wants an api key urgent: together.ai api key incompatible with new code base Mar 21, 2024
@tan-banana tan-banana changed the title urgent: together.ai api key incompatible with new code base urgent: together.ai api key incompatible with new code base updates Mar 21, 2024
@vivekuppal
Copy link
Owner

Transcribe configuration is very flexible. There are several ways to achieve the desired behavior of using Together AI.

They way described in the previous comment is accurate

OpenAI:
  api_key: 'API_KEY'
  base_url: 'https://api.together.xyz/v1'
  ai_model: ' together model '

The underlying issue is that Together AI does not support the way we use to validate the API key. This was a recent change.
I believe the issue has been fixed in #185 and your way of doing it should continue to work after that PR is merged.

@tan-banana
Copy link
Author

ok thanks for the validation of the issue. Thank you!

@vivekuppal
Copy link
Owner

Issue should be resolved now

@tan-banana
Copy link
Author

Resolved by new updates nice work thanks. sorry I couldn't fix it myself.

@j0n0w1ns
Copy link
Collaborator

Seems like this repo is serving some purpose to some extent.
There are multiple ways to contribute to the repo. Could write code, write something good about it, star the repo, make a video about useful use cases people like it for.

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

No branches or pull requests

4 participants