|
@@ -22,7 +22,7 @@ def test_validate_credentials():
|
|
|
model='mistralai/Mixtral-8x7B-Instruct-v0.1',
|
|
|
credentials={
|
|
|
'api_key': 'invalid_key',
|
|
|
- 'endpoint_url': 'https://api.together.xyz/v1/chat/completions',
|
|
|
+ 'endpoint_url': 'https://api.together.xyz/v1/',
|
|
|
'mode': 'chat'
|
|
|
}
|
|
|
)
|
|
@@ -31,7 +31,7 @@ def test_validate_credentials():
|
|
|
model='mistralai/Mixtral-8x7B-Instruct-v0.1',
|
|
|
credentials={
|
|
|
'api_key': os.environ.get('TOGETHER_API_KEY'),
|
|
|
- 'endpoint_url': 'https://api.together.xyz/v1/chat/completions',
|
|
|
+ 'endpoint_url': 'https://api.together.xyz/v1/',
|
|
|
'mode': 'chat'
|
|
|
}
|
|
|
)
|
|
@@ -43,7 +43,7 @@ def test_invoke_model():
|
|
|
model='mistralai/Mixtral-8x7B-Instruct-v0.1',
|
|
|
credentials={
|
|
|
'api_key': os.environ.get('TOGETHER_API_KEY'),
|
|
|
- 'endpoint_url': 'https://api.together.xyz/v1/completions',
|
|
|
+ 'endpoint_url': 'https://api.together.xyz/v1/',
|
|
|
'mode': 'completion'
|
|
|
},
|
|
|
prompt_messages=[
|
|
@@ -74,7 +74,7 @@ def test_invoke_stream_model():
|
|
|
model='mistralai/Mixtral-8x7B-Instruct-v0.1',
|
|
|
credentials={
|
|
|
'api_key': os.environ.get('TOGETHER_API_KEY'),
|
|
|
- 'endpoint_url': 'https://api.together.xyz/v1/chat/completions',
|
|
|
+ 'endpoint_url': 'https://api.together.xyz/v1/',
|
|
|
'mode': 'chat'
|
|
|
},
|
|
|
prompt_messages=[
|
|
@@ -110,7 +110,7 @@ def test_invoke_chat_model_with_tools():
|
|
|
model='gpt-3.5-turbo',
|
|
|
credentials={
|
|
|
'api_key': os.environ.get('OPENAI_API_KEY'),
|
|
|
- 'endpoint_url': 'https://api.openai.com/v1/chat/completions',
|
|
|
+ 'endpoint_url': 'https://api.openai.com/v1/',
|
|
|
'mode': 'chat'
|
|
|
},
|
|
|
prompt_messages=[
|
|
@@ -165,7 +165,7 @@ def test_get_num_tokens():
|
|
|
model='mistralai/Mixtral-8x7B-Instruct-v0.1',
|
|
|
credentials={
|
|
|
'api_key': os.environ.get('OPENAI_API_KEY'),
|
|
|
- 'endpoint_url': 'https://api.openai.com/v1/chat/completions'
|
|
|
+ 'endpoint_url': 'https://api.openai.com/v1/'
|
|
|
},
|
|
|
prompt_messages=[
|
|
|
SystemPromptMessage(
|