mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-07 19:03:17 +00:00
d57be47b0f
* ci(config.yml): add a 'check_code_quality' step Addresses https://github.com/BerriAI/litellm/issues/5991 * ci(config.yml): check why circle ci doesn't pick up this test * ci(config.yml): fix to run 'check_code_quality' tests * fix(__init__.py): fix unprotected import * fix(__init__.py): don't remove unused imports * build(ruff.toml): update ruff.toml to ignore unused imports * fix: fix: ruff + pyright - fix linting + type-checking errors * fix: fix linting errors * fix(lago.py): fix module init error * fix: fix linting errors * ci(config.yml): cd into correct dir for checks * fix(proxy_server.py): fix linting error * fix(utils.py): fix bare except causes ruff linting errors * fix: ruff - fix remaining linting errors * fix(clickhouse.py): use standard logging object * fix(__init__.py): fix unprotected import * fix: ruff - fix linting errors * fix: fix linting errors * ci(config.yml): cleanup code qa step (formatting handled in local_testing) * fix(_health_endpoints.py): fix ruff linting errors * ci(config.yml): just use ruff in check_code_quality pipeline for now * build(custom_guardrail.py): include missing file * style(embedding_handler.py): fix ruff check
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
# # LOCAL TEST
|
|
# from langchain.chat_models import ChatOpenAI
|
|
# from langchain.prompts.chat import (
|
|
# ChatPromptTemplate,
|
|
# HumanMessagePromptTemplate,
|
|
# SystemMessagePromptTemplate,
|
|
# )
|
|
# from langchain.schema import HumanMessage, SystemMessage
|
|
|
|
# chat = ChatOpenAI(
|
|
# openai_api_base="http://0.0.0.0:8000",
|
|
# model = "azure/chatgpt-v-2",
|
|
# temperature=0.1,
|
|
# extra_body={
|
|
# "metadata": {
|
|
# "generation_name": "ishaan-generation-langchain-client",
|
|
# "generation_id": "langchain-client-gen-id22",
|
|
# "trace_id": "langchain-client-trace-id22",
|
|
# "trace_user_id": "langchain-client-user-id2"
|
|
# }
|
|
# }
|
|
# )
|
|
|
|
# messages = [
|
|
# SystemMessage(
|
|
# content="You are a helpful assistant that im using to make a test request to."
|
|
# ),
|
|
# HumanMessage(
|
|
# content="test from litellm. tell me why it's amazing in 1 sentence"
|
|
# ),
|
|
# ]
|
|
# response = chat(messages)
|
|
|
|
# print(response)
|
|
|
|
# # claude_chat = ChatOpenAI(
|
|
# # openai_api_base="http://0.0.0.0:8000",
|
|
# # model = "claude-v1",
|
|
# # temperature=0.1
|
|
# # )
|
|
|
|
# # response = claude_chat(messages)
|
|
|
|
# # print(response)
|