You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importlmqlllm: lmql.LLM=lmql.model(
# the name of your deployed model/engine, e.g. 'my-model'lmql_model,
# model="gpt-3.5-turbo",api_type='azure',
api_base=open_ai_base,
api_key=openai_api_key,
api_version=openai_api_version,
tokenizer="openai/gpt-3.5-turbo",
# verbose=True,
)
@lmql.query(model=llm, verbose=True)defchain_of_thought(question):
'''lmql argmax # op-level strings are prompts "Tell me a joke:\n" # use 'where' constraints to control and restrict generation "Q:[JOKE]\n" where len(JOKE) < 120 and STOPS_AT(JOKE, "?") "A:[PUNCHLINE]\n" where STOPS_AT(PUNCHLINE, "\n") and len(TOKENS(PUNCHLINE)) > 1 return PUNCHLINE '''print(chain_of_thought('Why are cats selfish?'))
It fails with
OpenAIStreamError: ('logprobs, best_of and echo parameters are not available on gpt-35-turbo model. Please remove the parameter and try again. For more details, see https://go.microsoft.com/fwlink/?linkid=2227346. (after receiving 0 chunks. Current chunk time: 7.081031799316406e-05 Average chunk time: 0.0)', 'Stream duration:', 0.03593730926513672)
I run this code:
It fails with
According to Azure OpenAI API docs:
Is this a bug in the sense that lmql uses it for gpt3.5-turbo or it's more of a limitation ? Or maybe both..
The text was updated successfully, but these errors were encountered: