tasks-prompts-chain 0.0.4__py3-none-any.whl → 0.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -187,7 +187,7 @@ class TasksPromptsChain:
187
187
  if prompt_template.output_placeholder:
188
188
  placeholder_values[prompt_template.output_placeholder] = response_content
189
189
  self._results[prompt_template.output_placeholder] = response_content
190
- yield response_content
190
+ yield delta
191
191
 
192
192
  except Exception as e:
193
193
  raise Exception(f"Error in prompt chain execution at prompt {i}: {str(e)}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tasks_prompts_chain
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: A Python library for creating and executing chains of prompts using OpenAI's SDK with streaming support and template formatting.
5
5
  Project-URL: Homepage, https://github.com/smirfolio/tasks_prompts_chain
6
6
  Project-URL: Issues, https://github.com/smirfolio/tasks_prompts_chain/issues
@@ -59,8 +59,13 @@ from tasks_prompts_chain import TasksPromptsChain
59
59
  async def main():
60
60
  # Initialize the chain
61
61
  chain = TasksPromptsChain(
62
- model="gpt-3.5-turbo",
63
- api_key="your-api-key",
62
+ model_options={
63
+ "model": "gpt-3.5-turbo",
64
+ "api_key": "your-api-key",
65
+ "temperature": 0.1,
66
+ "max_tokens": 4120,
67
+ "stream": True
68
+ },
64
69
  final_result_placeholder="design_result"
65
70
  )
66
71
 
@@ -93,8 +98,13 @@ async def main():
93
98
 
94
99
  ```python
95
100
  chain = TasksPromptsChain(
96
- model="gpt-3.5-turbo",
97
- api_key="your-api-key",
101
+ model_options={
102
+ "model": "gpt-3.5-turbo",
103
+ "api_key": "your-api-key",
104
+ "temperature": 0.1,
105
+ "max_tokens": 4120,
106
+ "stream": True
107
+ },
98
108
  final_result_placeholder="result",
99
109
  system_prompt="You are a professional design expert specialized in luxury products",
100
110
  system_apply_to_all_prompts=True
@@ -105,10 +115,15 @@ chain = TasksPromptsChain(
105
115
 
106
116
  ```python
107
117
  chain = TasksPromptsChain(
108
- model="gpt-3.5-turbo",
109
- api_key="your-api-key",
118
+ model_options={
119
+ "model": "your-custom-model",
120
+ "api_key": "your-api-key",
121
+ "base_url": "https://your-custom-endpoint.com/v1",
122
+ "temperature": 0.1,
123
+ "max_tokens": 4120,
124
+ "stream": True
125
+ },
110
126
  final_result_placeholder="result",
111
- base_url="https://your-custom-endpoint.com/v1"
112
127
  )
113
128
  ```
114
129
 
@@ -0,0 +1,6 @@
1
+ tasks_prompts_chain/__init__.py,sha256=HVhC_vMTYCyZW6vnoErHh-TkAnNRqJ2JJqClJQSfU8Y,148
2
+ tasks_prompts_chain/tasks_prompts_chain.py,sha256=Ng1r8GvpAEKcOxMriX35lrmB74xHv2lZBMn1Mxs3AqE,9975
3
+ tasks_prompts_chain-0.0.5.dist-info/METADATA,sha256=Cg_LG_ZN60YK-MPAkoIeblVwDVO7ATdmBRvbZKZQZgs,5778
4
+ tasks_prompts_chain-0.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
+ tasks_prompts_chain-0.0.5.dist-info/licenses/LICENSE,sha256=WYmcYJG1QFgu1hfo7qrEkZ3Jhcz8NUWe6XUraZvlIFs,10172
6
+ tasks_prompts_chain-0.0.5.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- tasks_prompts_chain/__init__.py,sha256=HVhC_vMTYCyZW6vnoErHh-TkAnNRqJ2JJqClJQSfU8Y,148
2
- tasks_prompts_chain/tasks_prompts_chain.py,sha256=NwF9PmIHXbEzEusx7B5NTph3zgrJ-SuN74eCc2dRTPI,9986
3
- tasks_prompts_chain-0.0.4.dist-info/METADATA,sha256=pfN6RkU9RnR7fJm0i4_PnBKBGknzjd6URaXm0184HwA,5334
4
- tasks_prompts_chain-0.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
- tasks_prompts_chain-0.0.4.dist-info/licenses/LICENSE,sha256=WYmcYJG1QFgu1hfo7qrEkZ3Jhcz8NUWe6XUraZvlIFs,10172
6
- tasks_prompts_chain-0.0.4.dist-info/RECORD,,